This repository was archived by the owner on Feb 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +64
-25
lines changed Expand file tree Collapse file tree 7 files changed +64
-25
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "presets" : [
3
+ [
4
+ " @babel/preset-env" ,
5
+ {
6
+ "modules" : false ,
7
+ "useBuiltIns" : false
8
+ }
9
+ ]
10
+ ],
11
+ "plugins" : [
12
+ " @babel/plugin-proposal-export-default-from"
13
+ ]
14
+ }
Original file line number Diff line number Diff line change 1
1
node_modules
2
2
tests /* .json
3
3
4
+ package-lock.json
5
+
4
6
# editor and IDE remnants
5
7
* ~
6
8
.idea /
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
"directories" : {
7
7
"test" : " tests"
8
8
},
9
- "dependencies" : {},
9
+ "dependencies" : {
10
+ "@babel/polyfill" : " ^7.2.5"
11
+ },
10
12
"devDependencies" : {
13
+ "@babel/cli" : " ^7.2.3" ,
14
+ "@babel/core" : " ^7.3.3" ,
15
+ "@babel/plugin-proposal-export-default-from" : " ^7.2.0" ,
16
+ "@babel/preset-env" : " ^7.3.1" ,
11
17
"eslint" : " ^3.9.1" ,
12
18
"eslint-config-google" : " ^0.7.0" ,
13
- "gulp" : " ^3.9.0" ,
14
19
"qunit" : " ^0.7.7" ,
15
- "request" : " ^2.65.0"
20
+ "request" : " ^2.65.0" ,
21
+ "rimraf" : " ^2.6.3" ,
22
+ "rollup" : " ^1.2.2" ,
23
+ "rollup-plugin-babel" : " ^4.3.2" ,
24
+ "rollup-plugin-filesize" : " ^6.0.1" ,
25
+ "rollup-plugin-node-resolve" : " ^4.0.1" ,
26
+ "rollup-plugin-optimize-js" : " 0.0.4" ,
27
+ "rollup-plugin-uglify" : " ^6.0.2"
16
28
},
17
29
"scripts" : {
18
- "test" : " gulp test"
30
+ "test" : " node tests/testrunner.js" ,
31
+ "pretest" : " npm run build-package" ,
32
+ "build" : " npm run build-lib" ,
33
+ "build-lib" : " babel src --out-dir lib" ,
34
+ "prebuild-lib" : " rimraf lib" ,
35
+ "postbuild-lib" : " npm run build-package" ,
36
+ "build-package" : " rollup --config" ,
37
+ "prebuild-package" : " rimraf dist"
19
38
},
20
39
"repository" : {
21
40
"type" : " git" ,
Original file line number Diff line number Diff line change
1
+ const babel = require ( 'rollup-plugin-babel' ) ;
2
+ const resolve = require ( 'rollup-plugin-node-resolve' ) ;
3
+ const uglify = require ( 'rollup-plugin-uglify' ) ;
4
+ const optimize = require ( 'rollup-plugin-optimize-js' ) ;
5
+ const filesize = require ( 'rollup-plugin-filesize' ) ;
6
+
7
+ module . exports = {
8
+ input : 'src/index.js' ,
9
+ plugins : [
10
+ resolve ( ) ,
11
+ babel ( ) ,
12
+ // uglify.uglify(),
13
+ // optimize(),
14
+ filesize ( { showMinifiedSize : false } ) ,
15
+ ] ,
16
+ output : {
17
+ file : 'dist/jsonLogic.js' ,
18
+ format : 'umd' ,
19
+ name : 'jsonLogic' ,
20
+ exports : 'default' ,
21
+ }
22
+ } ;
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ testrunner.setup({
9
9
10
10
// specify dependency
11
11
testrunner . run ( {
12
- code : "../logic .js" ,
13
- tests : "tests.js"
12
+ code : "./dist/jsonLogic .js" ,
13
+ tests : "./tests/ tests.js"
14
14
} , function ( err , report ) {
15
15
if ( err ) console . dir ( err ) ;
16
16
// console.dir(report);
Original file line number Diff line number Diff line change 1
- var jsonLogic = require ( "../logic .js" ) ;
1
+ var jsonLogic = require ( "../dist/jsonLogic .js" ) ;
2
2
var http = require ( "http" ) ;
3
3
var fs = require ( "fs" ) ;
4
4
You can’t perform that action at this time.
0 commit comments