Skip to content

Commit

Permalink
env: dogfood rpt2 as a configPlugin w/ rollup.config.ts
Browse files Browse the repository at this point in the history
- use rpt2 as a `configPlugin` within our own build process, as well as to build itself
  - doubly dogfood

- we don't have any tests for `configPlugin`s, and it's a Rollup CLI option, so this is one of the few ways to test it
  - create a helper `_build-self` script so we don't need to type/repeat as much (or have as much potential for mistakes)

NOTE: this commit fails to build, need to make some more adjustments to the base config to get it to work in TS
- will do that in the next commits so that it's easier to read/differentiate/review
  • Loading branch information
agilgur5 committed Oct 13, 2022
1 parent 2199ffd commit 6196401
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"author": "@ezolenko",
"scripts": {
"prebuild": "rimraf dist/*",
"build": "rimraf dist/* && rollup -c",
"watch": "rollup -c rollup.config.self.js -w ",
"build-self": "rimraf dist/* && rollup -c rollup.config.self.js",
"build": "rollup -c rollup.config.ts --configPlugin typescript2",
"_build-self": "rollup -c rollup.config.self.ts --configPlugin ./build-self/dist/rollup-plugin-typescript2.es",
"watch": "npm run _build-self -- -w ",
"build-self": "rimraf dist/* && npm run _build-self",
"lint": "tslint -c ./tslint.json src/*.ts __tests__/*.ts ./*.js",
"test": "jest",
"test:watch": "jest --watch",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6196401

Please sign in to comment.