Skip to content

Commit aed1490

Browse files
committed
Stage 3: major refactor (WIP).
1 parent d4f7c71 commit aed1490

File tree

356 files changed

+1493
-47396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+1493
-47396
lines changed

.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
bower_components
21
node_modules
3-
css/app.css
4-
index.html
5-
vendor
2+
dist
63
.tmp
74
.DS_Store
85
npm-debug.log

.jshintrc

Lines changed: 0 additions & 42 deletions
This file was deleted.

Gruntfile.js

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,52 @@
1-
module.exports = function (grunt) {
2-
require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks);
1+
const webpackConfig = require('./webpack.config.js');
2+
3+
module.exports = grunt => {
4+
grunt.loadNpmTasks('grunt-contrib-copy');
5+
grunt.loadNpmTasks('grunt-contrib-stylus');
6+
grunt.loadNpmTasks('grunt-contrib-pug');
7+
grunt.loadNpmTasks('grunt-webpack');
38

49
grunt.initConfig({
5-
// clean: [
6-
// 'dist/'
7-
// ],
8-
watch: {
9-
min: {
10-
options: {
11-
livereload: true
12-
},
13-
files: ['Gruntfile.js', 'js/**/*.js', 'stylus/**/*.styl', 'views/**/*.jade', 'views/**/*.md'],
14-
tasks: ['build']
10+
copy: {
11+
main: {
12+
files: [{
13+
expand: true,
14+
src: ['img/**', 'fonts/**', 'assets/**'],
15+
dest: 'dist/website'
16+
}, {
17+
expand: true,
18+
flatten: true,
19+
src: [
20+
'node_modules/bootstrap/dist/css/bootstrap.min.css',
21+
'node_modules/codemirror/lib/codemirror.css',
22+
'node_modules/codemirror/addon/lint/lint.css',
23+
'css/budicon.css'
24+
],
25+
dest: 'dist/website/css/'
26+
}]
1527
}
16-
},
17-
connect: {
18-
dev: {
19-
options: {
20-
hostname: '0.0.0.0',
21-
livereload: true,
22-
protocol: 'http',
23-
passphrase: ''
24-
}
25-
},
26-
},
28+
},
2729
stylus: {
2830
compile: {
2931
files: {
30-
'css/app.css': 'stylus/app.styl'
32+
'dist/website/css/app.css': 'stylus/app.styl'
3133
}
3234
}
3335
},
34-
jade: {
36+
pug: {
3537
compile: {
3638
files: {
37-
'index.html': 'views/index.jade',
38-
'introduction/index.html': 'views/introduction.jade'
39+
'dist/website/index.html': 'views/index.pug',
40+
'dist/website/introduction/index.html': 'views/introduction.pug'
3941
}
4042
}
4143
},
42-
// useminPrepare: {
43-
// html: 'html/index.html',
44-
// options: {
45-
// root: '.',
46-
// dest: '.'
47-
// }
48-
// },
49-
// usemin: {
50-
// html: 'index.html',
51-
// options: {
52-
// assetsDir: ['dist/']
53-
// }
54-
// },
55-
// htmlmin: {
56-
// dist: {
57-
// files: { 'index.html': 'html/index.html' }
58-
// }
59-
// },
60-
mocha_phantomjs: {
61-
all: ['test/**/*.html']
44+
webpack: {
45+
prod: webpackConfig,
46+
dev: webpackConfig
6247
}
6348
});
6449

65-
grunt.registerTask('build', ['stylus', 'jade']);
66-
// grunt.registerTask('build', ['clean', 'stylus', 'jade', 'useminPrepare', 'concat', 'uglify', 'cssmin', 'htmlmin', 'usemin']);
67-
grunt.registerTask('test', ['build', 'mocha_phantomjs']);
68-
grunt.registerTask('default', ['build', 'connect', 'watch']);
50+
grunt.registerTask('build', ['copy', 'stylus', 'pug', 'webpack']);
51+
grunt.registerTask('default', ['build']);
6952
};

bower.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

css/bootstrap.min.css

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)