Skip to content
This repository was archived by the owner on Feb 12, 2020. It is now read-only.

Commit 98e5b66

Browse files
committed
start plugin
0 parents  commit 98e5b66

File tree

14 files changed

+10562
-0
lines changed

14 files changed

+10562
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules/
2+
/.sass-cache/
3+
/package-lock.json

Gruntfile.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*global module:false*/
2+
module.exports = function(grunt) {
3+
4+
// Project configuration.
5+
grunt.initConfig({
6+
// Metadata.
7+
pkg: grunt.file.readJSON('package.json'),
8+
9+
// SCSS.
10+
sass: {
11+
dist: {
12+
options: {
13+
style: 'compressed'
14+
},
15+
files: {
16+
'demo/assets/demo.css': 'src/scss/demo.scss'
17+
}
18+
}
19+
},
20+
21+
// CSS Processing.
22+
postcss: {
23+
options: {
24+
map: true,
25+
processors: [
26+
require('postcss-fixes')(),
27+
require('autoprefixer')( { browsers: 'last 3 versions' } ), // vendor prefixes
28+
require('cssnano')({
29+
safe: true,
30+
calc: false,
31+
zindex : false
32+
})
33+
]
34+
},
35+
36+
dist: {
37+
src: 'demo/assets/*.css'
38+
}
39+
},
40+
41+
// Javascript processing.
42+
jshint: {
43+
all: ['src/js/vue-blob-forms.js']
44+
},
45+
46+
uglify: {
47+
options: {
48+
mangle: false
49+
},
50+
my_target: {
51+
files: {
52+
'dist/vue-blob-forms.min.js': ['src/js/vue-blob-forms.js'],
53+
'demo/assets/demo.min.js': ['src/js/demo.js'],
54+
'demo/assets/vue-blob-forms.min.js': ['src/js/vue-blob-forms.js'],
55+
}
56+
}
57+
},
58+
59+
// File watcher.
60+
watch: {
61+
styles: {
62+
files: ['src/scss/*.scss', 'dist/css/*.css'],
63+
tasks: ['css', 'notify:css'],
64+
options: {
65+
spawn: false
66+
},
67+
},
68+
69+
scripts: {
70+
files: ['src/js/*.js'],
71+
tasks: ['javascript', 'notify:js'],
72+
options: {
73+
spawn: false
74+
},
75+
}
76+
},
77+
78+
// Notifications.
79+
notify: {
80+
css: {
81+
options:{
82+
title: "CSS Files built",
83+
message: "SASS and Post CSS task complete"
84+
}
85+
},
86+
87+
js: {
88+
options: {
89+
title: "JS Files built",
90+
message: "Uglify and JSHint task complete"
91+
}
92+
}
93+
}
94+
});
95+
96+
// These plugins provide necessary tasks.
97+
grunt.loadNpmTasks('grunt-contrib-uglify');
98+
grunt.loadNpmTasks('grunt-contrib-watch');
99+
grunt.loadNpmTasks('grunt-contrib-sass');
100+
grunt.loadNpmTasks('grunt-postcss');
101+
grunt.loadNpmTasks('grunt-contrib-jshint');
102+
grunt.loadNpmTasks('grunt-notify');
103+
104+
// Tasks.
105+
grunt.registerTask('default', ['css', 'javascript']);
106+
grunt.registerTask('css', ['sass', 'postcss']);
107+
grunt.registerTask('javascript', ['jshint', 'uglify']);
108+
109+
grunt.event.on('watch', function(action, filepath, target) {
110+
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
111+
});
112+
};

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
5+
6+
Everyone is permitted to copy and distribute verbatim or modified
7+
copies of this license document, and changing it is allowed as long
8+
as the name is changed.
9+
10+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12+
13+
0. You just DO WHAT THE FUCK YOU WANT TO.

demo/assets/demo.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/demo.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/demo.min.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
new Vue({el:"#vue-app",data:{},methods:{}});

demo/assets/vue-blob-forms.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)