Skip to content

Commit

Permalink
chore: npm scripts for release
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Apr 6, 2021
1 parent 8f03237 commit d582626
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@
"raspberry pi pico",
"emulator"
],
"files": [
"dist"
],
"author": "Uri Shaked <[email protected]>",
"license": "MIT",
"main": "index.js",
"main": "./dist/cjs/index.js",
"exports": {
".": "./dist/esm/index.js"
},
"typings": "./dist/esm/index.d.ts",
"scripts": {
"build": "rimraf dist && tsc && tsc -p tsconfig.esm.json",
"prepublish": "npm build",
"start": "ts-node demo/emulator-run.ts",
"start:gdb": "ts-node-dev src/gdbserver.ts",
"test": "jest"
Expand All @@ -23,6 +32,7 @@
"jest": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.1",
"ts-node-dev": "^1.1.6",
Expand Down
1 change: 0 additions & 1 deletion src/rp2040.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ describe('RP2040', () => {
it('should execute `bl 0x34` instruction', () => {
const rp2040 = new RP2040();
rp2040.PC = 0x10000000;
console.log(opcodeBL(0x34).toString(16));
rp2040.flashView.setUint32(0, opcodeBL(0x34), true);
rp2040.executeInstruction();
expect(rp2040.PC).toEqual(0x10000038);
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "esnext",
"outDir": "./dist/esm"
}
}
8 changes: 6 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"compilerOptions": {
"rootDir": "src",
"target": "es2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"outDir": "./dist" /* Redirect output structure to the directory. */,
"outDir": "./dist/cjs" /* Redirect output structure to the directory. */,
"strict": true /* Enable all strict type-checking options. */,
"declaration": true,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"skipLibCheck": true /* Skip type checking of declaration files. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
},
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.spec.ts"]
}

0 comments on commit d582626

Please sign in to comment.