Skip to content
Permalink
Browse files

chore: bundle morpher bin into bin.js to support older node versions

  • Loading branch information...
dariocravero committed Jul 5, 2019
1 parent 3755a5e commit 993b2f156ab5fc726c0719dfc62d7028e4562375
Showing with 35 additions and 42 deletions.
  1. +2 −4 .gitignore
  2. +0 −2 cli.js
  3. +6 −4 package.json
  4. +7 −4 rollup.config.js
  5. +0 −27 rollup.config.parse.js
  6. +20 −1 yarn.lock
@@ -2,9 +2,7 @@ node_modules
*.log
*.tmp
.DS_Store
lib.js
lib.js.map
parse.js
parse.js.map
bin.js
bin.js.map
TODO
.scannerwork
2 cli.js 100755 → 100644
@@ -1,5 +1,3 @@
#!/usr/bin/env node --experimental-modules

import { promises as fs } from 'fs'
import chalk from 'chalk'
import cleanup from './clean.js'
@@ -1,16 +1,16 @@
{
"name": "@viewstools/morph",
"version": "19.6.6",
"version": "19.6.7",
"description": "Views language morpher",
"main": "index.js",
"type": "module",
"bin": {
"views-morph": "./cli.js"
"views-morph": "./bin.js"
},
"private": false,
"scripts": {
"precommit": "lint-staged",
"prepare": "cross-env NODE_ENV=production rollup --config rollup.config.js && cross-env NODE_ENV=production rollup --config rollup.config.parse.js",
"prepare": "cross-env NODE_ENV=production rollup --config rollup.config.js && chmod +x bin.js",
"test": "jest",
"watch": "rollup --config rollup.config.js --watch"
},
@@ -36,7 +36,8 @@
"jest": "^24.3.1",
"lint-staged": "^8.1.5",
"rollup": "^1.6.0",
"rollup-plugin-babel": "^4.3.2"
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-json": "^4.0.0"
},
"dependencies": {
"array-uniq": "^2.0.0",
@@ -62,6 +63,7 @@
"prettier": "^1.4.2",
"read-pkg-up": "^4.0.0",
"robust-websocket": "^1.0.0",
"source-map-support": "^0.5.12",
"svgo": "^1.0.3",
"to-camel-case": "^1.0.0",
"to-pascal-case": "^1.0.0",
@@ -1,15 +1,18 @@
import babel from 'rollup-plugin-babel'
import pkg from './package.json'
import json from 'rollup-plugin-json'
// import pkg from './package.json'

export default {
input: 'index.js',
external: Object.keys(pkg.dependencies).concat('path'),
input: 'cli.js',
// external: Object.keys(pkg.dependencies).concat('path'),
output: {
file: 'lib.js',
banner: `#!/usr/bin/env node\nrequire('source-map-support').install();`,
file: 'bin.js',
format: 'cjs',
sourcemap: true,
},
plugins: [
json(),
babel({
babelrc: false,
presets: [

This file was deleted.

@@ -2172,6 +2172,11 @@ estree-walker@^0.6.0:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.0.tgz#5d865327c44a618dde5699f763891ae31f257dae"
integrity sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==

estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==

esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -5191,6 +5196,13 @@ rollup-plugin-babel@^4.3.2:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.3.0"

rollup-plugin-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow==
dependencies:
rollup-pluginutils "^2.5.0"

rollup-pluginutils@^2.3.0:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.7.1.tgz#a7915ce8b12c177364784bf38a1590cc6c2c8250"
@@ -5199,6 +5211,13 @@ rollup-pluginutils@^2.3.0:
estree-walker "^0.6.0"
micromatch "^3.1.10"

rollup-pluginutils@^2.5.0:
version "2.8.1"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97"
integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==
dependencies:
estree-walker "^0.6.1"

rollup@^1.6.0:
version "1.12.3"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.12.3.tgz#068b1957d5bebf6c0a758cfe42609b512add35a9"
@@ -5424,7 +5443,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"

source-map-support@^0.5.6:
source-map-support@^0.5.12, source-map-support@^0.5.6:
version "0.5.12"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==

0 comments on commit 993b2f1

Please sign in to comment.
You can’t perform that action at this time.