This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to babel plugin and re-using AST generated by babel #17
- Loading branch information
Ivan.Orlov
committed
Dec 19, 2016
1 parent
91a813f
commit 3862f7b
Showing
8 changed files
with
209 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const fsbx = require("./../build/commonjs/index.js"); | ||
const watch = require("watch"); | ||
|
||
//global.Promise = require('bluebird') | ||
const FuseBox = fsbx.FuseBox; | ||
const fs = require("fs"); | ||
//npm install babel-core babel-preset-latest | ||
let fuseBox = FuseBox.init({ | ||
homeDir: "_playground/babel", | ||
cache: true, | ||
outFile: "_playground/_build/out.js", | ||
|
||
|
||
plugins: [ | ||
fsbx.SVGPlugin(), | ||
fsbx.CSSPlugin(), | ||
fsbx.BabelPlugin({ | ||
config: { | ||
sourceMaps: true, | ||
presets: ["latest", "stage-0"], | ||
// plugins: [ | ||
// ["transform-react-jsx"] | ||
// ] | ||
} | ||
}) | ||
] | ||
}); | ||
|
||
fuseBox.bundle(">index.js", true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import lib from "./lib/foo"; | ||
console.log("my lib", lib); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Foo from "./foo"; | ||
|
||
export default Foo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,65 @@ | ||
{ | ||
"name": "fuse-box", | ||
"version": "1.3.12", | ||
"description": "Fuse-Box a bundler just does it right", | ||
"typings": "./dist/typings/index.d.ts", | ||
"main": "dist/commonjs/index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "TRAVIS=true ./node_modules/mocha/bin/mocha" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/fuse-box/fuse-box.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/fuse-box/fuse-box/issues" | ||
}, | ||
"homepage": "https://github.com/fuse-box/fuse-box#readme", | ||
"devDependencies": { | ||
"@types/node": "^6.0.41", | ||
"cheerio": "0.22.0", | ||
"fuse-box-test-using-old-version": "^1.0.0", | ||
"fuse-box-testcase1": "^1.0.0", | ||
"fuse-box-testcase3": "^1.0.3", | ||
"gulp": "^3.9.1", | ||
"gulp-bump": "^2.4.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-replace": "^0.5.4", | ||
"gulp-sourcemaps": "^1.6.0", | ||
"gulp-typescript": "^3.0.1", | ||
"gulp-uglify": "^2.0.0", | ||
"gulp-wrap": "^0.13.0", | ||
"mocha": "^3.1.0", | ||
"reflect-metadata": "^0.1.8", | ||
"rollup": "^0.36.3", | ||
"run-sequence": "^1.2.2", | ||
"should": "^11.1.0", | ||
"typescript": "^2.1.1", | ||
"watch": "^1.0.1", | ||
"wires-reactive": "^1.1.1" | ||
}, | ||
"dependencies": { | ||
"acorn": "^4.0.3", | ||
"acorn-es7": "^0.1.0", | ||
"acorn-jsx": "^3.0.1", | ||
"ansi": "^0.3.1", | ||
"app-root-path": "^2.0.1", | ||
"ast-traverse": "^0.1.1", | ||
"buffer": "^5.0.0", | ||
"concat-with-sourcemaps": "^1.0.4", | ||
"escodegen": "^1.8.1", | ||
"glob": "^7.1.1", | ||
"mkdirp": "^0.5.1", | ||
"pretty-time": "^0.2.0", | ||
"prettysize": "0.0.3", | ||
"realm-utils": "^1.0.6", | ||
"request": "^2.79.0" | ||
} | ||
} | ||
"name": "fuse-box", | ||
"version": "1.3.12", | ||
"description": "Fuse-Box a bundler just does it right", | ||
"typings": "./dist/typings/index.d.ts", | ||
"main": "dist/commonjs/index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "TRAVIS=true ./node_modules/mocha/bin/mocha" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/fuse-box/fuse-box.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/fuse-box/fuse-box/issues" | ||
}, | ||
"homepage": "https://github.com/fuse-box/fuse-box#readme", | ||
"devDependencies": { | ||
"@types/node": "^6.0.41", | ||
"cheerio": "0.22.0", | ||
"fuse-box-test-using-old-version": "^1.0.0", | ||
"fuse-box-testcase1": "^1.0.0", | ||
"fuse-box-testcase3": "^1.0.3", | ||
"gulp": "^3.9.1", | ||
"gulp-bump": "^2.4.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-replace": "^0.5.4", | ||
"gulp-sourcemaps": "^1.6.0", | ||
"gulp-typescript": "^3.0.1", | ||
"gulp-uglify": "^2.0.0", | ||
"gulp-wrap": "^0.13.0", | ||
"mocha": "^3.1.0", | ||
"reflect-metadata": "^0.1.8", | ||
"rollup": "^0.36.3", | ||
"run-sequence": "^1.2.2", | ||
"should": "^11.1.0", | ||
"typescript": "^2.1.1", | ||
"watch": "^1.0.1", | ||
"wires-reactive": "^1.1.1" | ||
}, | ||
"dependencies": { | ||
"acorn": "^4.0.3", | ||
"acorn-es7": "^0.1.0", | ||
"acorn-jsx": "^3.0.1", | ||
"ansi": "^0.3.1", | ||
"app-root-path": "^2.0.1", | ||
"ast-traverse": "^0.1.1", | ||
"buffer": "^5.0.0", | ||
"concat-with-sourcemaps": "^1.0.4", | ||
"escodegen": "^1.8.1", | ||
"glob": "^7.1.1", | ||
"mkdirp": "^0.5.1", | ||
"pretty-time": "^0.2.0", | ||
"prettysize": "0.0.3", | ||
"realm-utils": "^1.0.6", | ||
"request": "^2.79.0", | ||
"watch": "^1.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.