Skip to content

Commit e344d62

Browse files
authored
Merge pull request #280 from Smankusors/fix-grunt-not-copy-js
Fix js not updating when doing npm run dev
2 parents 90156bf + 58536c1 commit e344d62

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Gruntfile.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,13 @@ module.exports = function(grunt) {
622622
},
623623

624624
copy: {
625-
docs: {
625+
docs_js: {
626626
files: [
627627
{src: 'bin/materialize.js', dest: 'docs/js/materialize.js'},
628+
]
629+
},
630+
docs_templates: {
631+
files: [
628632
{src: 'templates/**', dest: 'docs/'}
629633
]
630634
}
@@ -682,7 +686,7 @@ module.exports = function(grunt) {
682686
});
683687

684688
grunt.registerTask('pug_compile', ['pug', 'notify:pug_compile']);
685-
grunt.registerTask('js_compile', ['concat:temp', 'configureBabel', 'babel:bin', 'clean:temp']);
689+
grunt.registerTask('js_compile', ['concat:temp', 'configureBabel', 'babel:bin', 'clean:temp', 'copy:docs_js']);
686690
grunt.registerTask('sass_compile', [
687691
'sass:gh',
688692
'sass:bin',
@@ -704,5 +708,5 @@ module.exports = function(grunt) {
704708
grunt.task.run(tasks);
705709

706710
});
707-
grunt.registerTask('docs', ['js_compile', 'copy:docs', 'sass:gh', 'postcss:gh', 'pug', 'replace:docs']);
711+
grunt.registerTask('docs', ['js_compile', 'copy:docs_js', 'copy:docs_templates', 'sass:gh', 'postcss:gh', 'pug', 'replace:docs']);
708712
};

0 commit comments

Comments
 (0)