Skip to content

Commit

Permalink
added zip Grunt task
Browse files Browse the repository at this point in the history
  • Loading branch information
daskepon committed Sep 12, 2018
1 parent a05afd6 commit d9d9546
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,2 +1,3 @@
.DS_store
node_modules
node_modules
dist/
12 changes: 10 additions & 2 deletions Gruntfile.js
Expand Up @@ -58,7 +58,9 @@ module.exports = function(grunt) {
options: {
map: true,
processors: [
require('autoprefixer-core')({ browsers: ['last 2 versions'] })
require('autoprefixer-core')({
browsers: ['last 2 versions']
})
]
},
dev: {
Expand All @@ -78,7 +80,13 @@ module.exports = function(grunt) {
watch: {
css: {
files: '<%= config.cssSrcDir %>/**/*.scss',
tasks: ['sass:dev','copy:dev','postcss:dev']
tasks: ['sass:dev', 'copy:dev', 'postcss:dev']
}
},
zip: {
dist: {
src: ['**','!node_modules', '!node_modules/**', '!src', '!src/**', '!.git', '!.git/**', '!.gitignore', '!dist', '!dist/**'],
dest: `dist/${require('./package.json').name}.zip`
}
}
});
Expand Down
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -53,6 +53,10 @@ Build Grunt project:

grunt build

The zip Grunt task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.

grunt zip

## Copyright & License

Copyright (C) 2015-2018 Peter Amende - Released under the [MIT License](https://github.com/zutrinken/attila/blob/master/LICENSE).
2 changes: 1 addition & 1 deletion assets/js/script.js

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -41,6 +41,7 @@
"grunt-contrib-watch": "^1.0.0",
"grunt-postcss": "^0.9.0",
"grunt-sass": "^2.1.0",
"grunt-zip": "^0.18.1",
"load-grunt-tasks": "^3.5.2"
},
"config": {
Expand Down

0 comments on commit d9d9546

Please sign in to comment.