Skip to content

Commit 772c9d6

Browse files
aminyalierdakil
authored andcommitted
feat: add parcel
1 parent e042e1f commit 772c9d6

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
atom-amd64.deb
33
build-package.sh
4+
.parcel-cache

.parcelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
5+
}
6+
}

lib/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"jsxFactory": "etch.dom",
77
"lib": ["es7", "dom", "ES2017.object"],
88
"module": "commonjs",
9+
"esModuleInterop": true,
10+
"allowJs": true,
911
"noLib": false,
1012
"outDir": "../dist",
1113
"preserveConstEnums": true,

package.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "atom-typescript",
33
"version": "13.9.3",
4-
"main": "./dist/main/atomts",
4+
"main": "./dist/main/atomts.js",
55
"preferGlobal": true,
66
"description": "The only TypeScript plugin you will ever need.",
77
"atomTestRunner": "./node_modules/atom-ts-spec-runner/runner.js",
@@ -15,7 +15,9 @@
1515
]
1616
},
1717
"scripts": {
18-
"build": "tsc -p ./lib",
18+
"tsc": "tsc -p ./lib",
19+
"dev": "cross-env NODE_ENV=development parcel watch --target main lib/main/atomts.ts",
20+
"build": "cross-env NODE_ENV=production parcel build --target main lib/main/atomts.ts",
1921
"prettier": "ts-node scripts/prettier.ts write",
2022
"prettier-check": "ts-node scripts/prettier.ts check",
2123
"typecheck": "tsc --noEmit -p ./lib && tsc --noEmit -p ./scripts && tsc --noEmit -p ./spec",
@@ -396,11 +398,29 @@
396398
"ts-node": "^9.0.0",
397399
"tslint": "^6.1.3",
398400
"tslint-use-atom-disposables": "0.0.1",
399-
"typescript-tslint-plugin": "0.5.5"
401+
"typescript-tslint-plugin": "0.5.5",
402+
"parcel": "^2.0.0-beta.1",
403+
"@parcel/transformer-typescript-tsc": "^2.0.0-beta.1",
404+
"cross-env": "7.0.2"
400405
},
401406
"package-deps": [
402407
"atom-ide-ui:0.13.0"
403408
],
409+
"targets": {
410+
"main": {
411+
"context": "electron-renderer",
412+
"engines": {
413+
"electron": ">=5.x"
414+
},
415+
"includeNodeModules": {
416+
"atom": false,
417+
"electron": false,
418+
"typescript": false
419+
},
420+
"outputFormat": "commonjs",
421+
"isLibrary": true
422+
}
423+
},
404424
"keywords": [
405425
"typescript",
406426
"javascript",

0 commit comments

Comments
 (0)