Skip to content

Commit

Permalink
[build] add babel
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 14, 2023
1 parent 479e7bb commit a5c1cf9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": { "node": 12 },
"bugfixes": true,
"spec": true,
"useBuiltIns": false,
"shippedProposals": true
}
]
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.nyc_output/
coverage/
node_modules/
lib/
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
},
"license": "MIT",
"scripts": {
"prepublishOnly": "npm run build",
"prebuild": "rimraf lib && mkdirp lib",
"build": "babel src -d lib",
"lint": "eslint --ext=js,mjs .",
"pretests-only": "npm run build",
"tests-only": "nyc mocha ./test/",
"pretest": "npm run lint",
"test": "npm run tests-only"
Expand All @@ -34,10 +38,14 @@
"language-subtag-registry": "^0.3.20"
},
"devDependencies": {
"@babel/cli": "^7.22.10",
"@babel/preset-env": "^7.22.10",
"coveralls": "^3.1.1",
"eslint": "^8.47.0",
"mkdirp": "^0.5.6",
"mocha": "^10.2.0",
"nyc": "^15.1.0"
"nyc": "^15.1.0",
"rimraf": "^3.0.2"
},
"files": [
"/lib"
Expand All @@ -53,6 +61,9 @@
"env": {
"node": true
},
"ignorePatterns": [
"!.babelrc.js"
],
"overrides": [
{
"files": "test/**",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a5c1cf9

Please sign in to comment.