2
2
3
3
name: ' derby-select2'
4
4
description: ' Native Derby JS replacement for jQuery Select2'
5
- version: ' 0.1 .0'
5
+ version: ' 0.2 .0'
6
6
7
7
author:
8
8
name: ' Michael Brade'
@@ -30,6 +30,10 @@ devDependencies:
30
30
' babel-cli' : ' 6.x'
31
31
' babel-preset-es2015-loose' : ' 6.x'
32
32
33
+ peerDependencies:
34
+ ' derby' : ' michael-brade/derby'
35
+
36
+
33
37
34
38
eslintConfig:
35
39
env:
@@ -57,20 +61,23 @@ scripts:
57
61
export DEST=dist;
58
62
export ASSETS='.*\.scss|.*\.html|./README\.md|./package\.json';
59
63
60
- find \\ ( -path './node_modules* ' -o -path \" ./$DEST \" \\ ) -prune -o -name '*.js' -print0
64
+ find \\ ( -path './node_modules' -o -path \" ./$DEST \" -o -path './test' \\ ) -prune -o -name '*.js' -print0
61
65
| xargs -n1 -P8 -0 sh -c '
62
66
echo Compiling and minifying $0 ...;
63
67
mkdir -p \" $DEST /` dirname $0 ` \" ;
64
- babel --presets es2015 \" $0 \" | uglifyjs - -cm -o \" $DEST /$0 \" ;
68
+ babel --presets es2015-loose \" $0 \" | uglifyjs - -cm -o \" $DEST /$0 \" ;
65
69
';
66
70
67
71
echo \" \033[01;32mCopying assets...\033[00m\" ;
68
- find \\ ( -path './node_modules* ' -o -path \" ./$DEST \" \\ ) -prune -o -regextype posix-egrep -regex $ASSETS -print0
72
+ find \\ ( -path './node_modules' -o -path \" ./$DEST \" \\ ) -prune -o -regextype posix-egrep -regex $ASSETS -print0
69
73
| xargs -n1 -0 sh -c '
70
74
mkdir -p \" $DEST /` dirname \" $0 \" ` \" ;
71
75
cp -a \" $0 \" \" $DEST /$0 \"
72
76
';
73
77
78
+ echo \" \033[01;32mMinifying views...\033[00m\" ;
79
+ find \" $DEST \" -name '*.html' -print0 | xargs -n1 -0 perl -i -p0e 's/\\ n//g;s/ +/ /g;s/<!--.*?-->//g';
80
+
74
81
echo \" \033[01;32mDone!\033[00m\" ;
75
82
"
76
83
# restore the original situation
@@ -82,11 +89,7 @@ scripts:
82
89
83
90
test: " echo \" TODO: no tests specified yet\" && exit 1;"
84
91
85
- # # publishing - run as "npm run publish"
86
-
87
- prepublish: " npm run clean; npm run build;"
88
- publish: " npm publish dist;"
89
-
92
+ # # publishing: run "npm run build; cd dist; npm publish"
90
93
91
94
engines:
92
95
node: ' 6.x'
0 commit comments