Skip to content

Commit

Permalink
fix package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Mar 1, 2023
1 parent 01db7e8 commit cdb9ad5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -2,8 +2,9 @@
"name": "@masa-finance/masa-react",
"version": "0.29.6",
"license": "MIT",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts",
"module": "./dist/browser/masa-react.amd.min.js",
"files": [
"dist"
],
Expand All @@ -13,7 +14,7 @@
"scripts": {
"start": "yarn build:watch",
"build": "yarn build:tsc && yarn build:dist",
"build:tsc": "tsc -m es6 --outDir dist && cp -R ./src/fonts/ ./dist/fonts/ && mkdir -p ./dist && mkdir -p ./dist/components/modal && cp ./src/provider/styles.scss ./dist/provider/styles.scss && cp ./src/components/modal/styles.scss ./dist/components/modal/styles.scss",
"build:tsc": "tsc && mkdir -p ./dist && cp -R ./src/fonts ./dist/src/fonts && mkdir -p ./dist/src/components/modal && cp ./src/provider/styles.scss ./dist/src/provider/styles.scss && cp ./src/components/modal/styles.scss ./dist/src/components/modal/styles.scss",
"build:dist": "cross-env NODE_ENV=production webpack",
"build:watch": "tsc -w",
"lint": "eslint src/**/*.{ts,tsx} stories/**/*.tsx --fix",
Expand Down
17 changes: 11 additions & 6 deletions tsconfig.json
@@ -1,11 +1,18 @@
{
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"include": ["src"],
"include": [
"src"
],
"compilerOptions": {
"target": "ES2015",
"module": "ESNext",
"lib": ["DOM", "ESNext"],
"typeRoots": ["node_modules/@types"],
"module": "ES6",
"lib": [
"DOM",
"ESNext"
],
"typeRoots": [
"node_modules/@types"
],
"importHelpers": true,
"baseUrl": "./src",
// output .d.ts declaration files for consumers
Expand Down Expand Up @@ -33,8 +40,6 @@
"skipLibCheck": true,
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
// `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
"noEmit": true,
// don't fail on any all the time
"noImplicitAny": false,
"allowSyntheticDefaultImports": true,
Expand Down
2 changes: 1 addition & 1 deletion webpack.parts.js
Expand Up @@ -6,7 +6,7 @@ const development = require('./webpack.development.js');
const production = require('./webpack.production.js');

const paths = {
entry: path.resolve(__dirname, './dist/index.js'),
entry: path.resolve(__dirname, './dist/src/index.js'),
bundle: path.resolve(__dirname, './dist/browser'),
};

Expand Down

0 comments on commit cdb9ad5

Please sign in to comment.