Skip to content

Commit 46289b5

Browse files
Merge pull request #212 from championswimmer/grunt_tasks
add clean task, refactor dist, build
2 parents 9d531e1 + eb4be5c commit 46289b5

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

gruntfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const getFiles = () => fs
2727

2828

2929
module.exports = function(grunt) {
30+
grunt.loadNpmTasks('grunt-contrib-clean');
3031
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
3132

3233
grunt.initConfig ({
@@ -89,7 +90,13 @@ module.exports = function(grunt) {
8990
server: {
9091
url: 'http://localhost:9000'
9192
}
92-
}
93+
},
94+
clean: [
95+
'dist',
96+
'live',
97+
'examples/html',
98+
'examples/public/stylesheets/'
99+
]
93100
});
94101

95102
grunt.registerTask('server', function (target) {

live.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
rm -rf live
22
mkdir live
3-
cp -R examples/html/* live/
4-
cp -R examples/public/* live/
3+
cp -Rv examples/html/* live/
4+
cp -Rv examples/public/* live/

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"bootstrap-sass-grid": "^4.0.1",
77
"express": "^4.16.2",
88
"grunt": "^1.0.2",
9+
"grunt-contrib-clean": "^1.1.0",
910
"grunt-contrib-connect": "^1.0.2",
1011
"grunt-contrib-livereload": "^0.1.2",
1112
"grunt-contrib-watch": "^1.0.0",
@@ -21,8 +22,10 @@
2122
},
2223
"scripts": {
2324
"test": "echo \"Error: no test specified\" && exit 1",
25+
"clean": "grunt clean",
2426
"start": "grunt server",
25-
"build": "node-sass sass/styles/app.scss dist/app.min.css --output-style compressed && node-sass sass/styles/app.scss dist/app.css"
27+
"build": "grunt build",
28+
"dist": "node-sass sass/styles/app.scss dist/app.min.css --output-style compressed && node-sass sass/styles/app.scss dist/app.css"
2629
},
2730
"repository": {
2831
"type": "git",

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,13 @@ grunt-cli@~1.2.0:
10041004
nopt "~3.0.6"
10051005
resolve "~1.1.0"
10061006

1007+
grunt-contrib-clean@^1.1.0:
1008+
version "1.1.0"
1009+
resolved "https://registry.yarnpkg.com/grunt-contrib-clean/-/grunt-contrib-clean-1.1.0.tgz#564abf2d0378a983a15b9e3f30ee75b738c40638"
1010+
dependencies:
1011+
async "^1.5.2"
1012+
rimraf "^2.5.1"
1013+
10071014
grunt-contrib-connect@^1.0.2:
10081015
version "1.0.2"
10091016
resolved "https://registry.yarnpkg.com/grunt-contrib-connect/-/grunt-contrib-connect-1.0.2.tgz#5cf933b91a67386044273c0b2444603cd98879ba"
@@ -2299,7 +2306,7 @@ right-align@^0.1.1:
22992306
dependencies:
23002307
align-text "^0.1.1"
23012308

2302-
rimraf@2:
2309+
rimraf@2, rimraf@^2.5.1:
23032310
version "2.6.2"
23042311
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
23052312
dependencies:

0 commit comments

Comments
 (0)