Commit 001f446c 001f446c1dbba804a9e7d0bdb57fb46a2d04f0f2 by Vincent Peybernes

Add build

1 parent 7f192298
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
2 .idea 2 .idea
3 *.iml 3 *.iml
4 4
5 #Node 5 # Node
6 node_modules 6 node_modules
7
8 # Build
9 dist
...\ No newline at end of file ...\ No newline at end of file
......
1 /**
2 * Created by Techniv on 12/01/2017.
3 */
4
5 const gulp = require('gulp'),
6 del = require('del');
7
8 const distPath = './dist/';
9 const srcPath = './src/matrix-validation.js';
10
11 gulp.task('clean', () => {
12 return del(distPath);
13 });
14
15 gulp.task('build', () => {
16 gulp.src(srcPath)
17 .pipe(gulp.dest(distPath));
18 });
...\ No newline at end of file ...\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
4 "description": "Matrix valition for angular form", 4 "description": "Matrix valition for angular form",
5 "main": "index.js", 5 "main": "index.js",
6 "scripts": { 6 "scripts": {
7 "test": "echo \"Error: no test specified\" && exit 1" 7 "test": "echo \"Error: no test specified\" && exit 1",
8 "build": "node_modules/.bin/gulp build",
9 "postinstall": "npm run build"
8 }, 10 },
9 "author": { 11 "author": {
10 "name": "Techniv", 12 "name": "Techniv",
...@@ -13,6 +15,8 @@ ...@@ -13,6 +15,8 @@
13 "license": "MIT", 15 "license": "MIT",
14 16
15 "devDependencies": { 17 "devDependencies": {
18 "gulp": "*",
19 "del": "*",
16 "angular": "*" 20 "angular": "*"
17 } 21 }
18 } 22 }
......