Skip to content

Commit b61b165

Browse files
committed
Add transpilation build step
1 parent 507dd93 commit b61b165

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
build
2+
13
node_modules
24
npm-debug.log
35
package-lock.json

babel.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const presets = [
2+
[
3+
"@babel/env",
4+
{
5+
targets: {
6+
edge: "44",
7+
firefox: "66",
8+
chrome: "73",
9+
safari: "12",
10+
ie: "9"
11+
}
12+
},
13+
],
14+
];
15+
16+
module.exports = {presets};

package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
"name": "assert",
33
"version": "2.0.0-prerelease",
44
"description": "The assert module from Node.js, for the browser.",
5-
"main": "./assert.js",
5+
"main": "build/assert.js",
66
"license": "MIT",
77
"homepage": "https://github.com/browserify/commonjs-assert",
88
"repository": "browserify/commonjs-assert",
99
"scripts": {
10-
"test": "node test.js",
11-
"test:browsers": "airtap test.js",
10+
"build": "babel assert.js test.js --out-dir build && babel internal --out-dir build/internal && babel test --out-dir build/test",
11+
"test": "node build/test.js",
12+
"test:browsers": "airtap build/test.js",
1213
"test:browsers:local": "npm run test:browsers -- --local"
1314
},
1415
"keywords": [
1516
"assert",
1617
"browser"
1718
],
1819
"devDependencies": {
20+
"@babel/cli": "^7.4.4",
21+
"@babel/core": "^7.4.4",
22+
"@babel/preset-env": "^7.4.4",
1923
"airtap": "^2.0.2",
2024
"cross-env": "^5.2.0",
2125
"tape": "^4.10.1"

0 commit comments

Comments
 (0)