diff --git a/package.json b/package.json index af03754..d56887a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "repository": "https://github.com/atom-ide-community/babel", "license": "MIT", "scripts": { + "clean": "shx rm -rf dist", + "build": "npm run clean && ncc build index.js -o dist --minify && npm run minify", + "minify": "terser dist/index.js -o dist/index.js --compress --comments --ecma=2018", "bump": "ncu -u" }, "dependencies": { @@ -42,6 +45,10 @@ "devDependencies": { "@babel/cli": "7.10.5", "@babel/core": "7.10.5", - "npm-check-updates": "7.0.2" + "npm-check-updates": "7.0.2", + "@zeit/ncc": "0.22.3", + "shx": "^0.3.2", + "cross-env": "^7.0.2", + "terser": "latest" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 664bf53..9c2a101 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,11 @@ dependencies: devDependencies: '@babel/cli': 7.10.5_@babel+core@7.10.5 '@babel/core': 7.10.5 + '@zeit/ncc': 0.22.3 + cross-env: 7.0.2 npm-check-updates: 7.0.2 + shx: 0.3.2 + terser: 4.8.0 lockfileVersion: 5.1 packages: /@babel/cli/7.10.5_@babel+core@7.10.5: @@ -75,6 +79,7 @@ packages: resolve: 1.17.0 semver: 5.7.1 source-map: 0.5.7 + dev: true engines: node: '>=6.9.0' resolution: @@ -267,6 +272,7 @@ packages: '@babel/template': 7.10.4 '@babel/traverse': 7.10.5 '@babel/types': 7.10.5 + dev: true resolution: integrity: sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA== /@babel/highlight/7.10.4: @@ -1292,6 +1298,11 @@ packages: dev: true resolution: integrity: sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + /@zeit/ncc/0.22.3: + dev: true + hasBin: true + resolution: + integrity: sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ== /abbrev/1.1.1: dev: true resolution: @@ -1564,6 +1575,10 @@ packages: hasBin: true resolution: integrity: sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ== + /buffer-from/1.1.1: + dev: true + resolution: + integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== /builtins/1.0.3: dev: true resolution: @@ -1786,6 +1801,10 @@ packages: node: '>= 0.8' resolution: integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + /commander/2.20.3: + dev: true + resolution: + integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== /commander/4.1.1: dev: true engines: @@ -1826,6 +1845,7 @@ packages: /convert-source-map/1.7.0: dependencies: safe-buffer: 5.1.2 + dev: true resolution: integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== /copy-descriptor/0.1.1: @@ -1844,6 +1864,27 @@ packages: /core-util-is/1.0.2: resolution: integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + /cross-env/7.0.2: + dependencies: + cross-spawn: 7.0.3 + dev: true + engines: + node: '>=10.14' + npm: '>=6' + yarn: '>=1' + hasBin: true + resolution: + integrity: sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw== + /cross-spawn/7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== /crypto-random-string/2.0.0: dev: true engines: @@ -2007,6 +2048,10 @@ packages: dev: true resolution: integrity: sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= + /es6-object-assign/1.1.0: + dev: true + resolution: + integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= /escalade/3.0.2: dev: false engines: @@ -2218,6 +2263,7 @@ packages: resolution: integrity: sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= /gensync/1.0.0-beta.1: + dev: true engines: node: '>=6.9.0' resolution: @@ -2484,6 +2530,12 @@ packages: dev: true resolution: integrity: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + /interpret/1.4.0: + dev: true + engines: + node: '>= 0.10' + resolution: + integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== /invariant/2.2.4: dependencies: loose-envify: 1.4.0 @@ -2766,6 +2818,7 @@ packages: /json5/2.1.3: dependencies: minimist: 1.2.5 + dev: true engines: node: '>=6' hasBin: true @@ -3005,6 +3058,7 @@ packages: resolution: integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== /minimist/1.2.5: + dev: true resolution: integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== /minipass-collect/1.0.2: @@ -3487,7 +3541,14 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + /path-key/3.1.1: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== /path-parse/1.0.6: + dev: true resolution: integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== /performance-now/2.1.0: @@ -3630,6 +3691,14 @@ packages: optional: true resolution: integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + /rechoir/0.6.2: + dependencies: + resolve: 1.17.0 + dev: true + engines: + node: '>= 0.10' + resolution: + integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= /regenerate-unicode-properties/8.2.0: dependencies: regenerate: 1.4.1 @@ -3769,6 +3838,7 @@ packages: /resolve/1.17.0: dependencies: path-parse: 1.0.6 + dev: true resolution: integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== /resolve/1.7.1: @@ -3872,6 +3942,42 @@ packages: optional: true resolution: integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + /shebang-command/2.0.0: + dependencies: + shebang-regex: 3.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + /shebang-regex/3.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + /shelljs/0.8.4: + dependencies: + glob: 7.1.6 + interpret: 1.4.0 + rechoir: 0.6.2 + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + /shx/0.3.2: + dependencies: + es6-object-assign: 1.1.0 + minimist: 1.2.5 + shelljs: 0.8.4 + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA== /signal-exit/3.0.3: dev: true resolution: @@ -3956,6 +4062,13 @@ packages: optional: true resolution: integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + /source-map-support/0.5.19: + dependencies: + buffer-from: 1.1.1 + source-map: 0.6.1 + dev: true + resolution: + integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== /source-map-url/0.4.0: optional: true resolution: @@ -3965,6 +4078,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + /source-map/0.6.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== /spawn-please/0.3.0: dev: true engines: @@ -4130,6 +4249,17 @@ packages: node: '>=8' resolution: integrity: sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== + /terser/4.8.0: + dependencies: + commander: 2.20.3 + source-map: 0.6.1 + source-map-support: 0.5.19 + dev: true + engines: + node: '>=6.0.0' + hasBin: true + resolution: + integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== /to-fast-properties/2.0.0: engines: node: '>=4' @@ -4421,5 +4551,9 @@ specifiers: '@babel/preset-env': 7.10.4 '@babel/preset-flow': 7.10.4 '@babel/preset-react': 7.10.4 + '@zeit/ncc': 0.22.3 babel-plugin-add-module-exports: ^1.0.2 + cross-env: ^7.0.2 npm-check-updates: 7.0.2 + shx: ^0.3.2 + terser: latest