Move to webpack

This commit is contained in:
Sam Nolan 2022-03-22 10:40:14 +11:00
parent 7ccaf6c882
commit de72492e4d
11 changed files with 247 additions and 3170 deletions

View File

@ -0,0 +1,9 @@
node_modules
storybook-static
public
build
.storybook
.direnv
.envrc
webpack.config.js
index.html

View File

@ -1,9 +1,8 @@
{
"name": "@squiggle/components",
"version": "0.1.0",
"private": true,
"name": "@quri/squiggle-components",
"version": "0.1.5",
"dependencies": {
"@squiggle/lang": "0.1.9",
"@quri/squiggle-lang": "0.2.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
@ -69,11 +68,17 @@
"@storybook/node-logger": "^6.4.18",
"@storybook/preset-create-react-app": "^4.0.0",
"@storybook/react": "^6.4.18",
"webpack": "^5.68.0"
"@types/webpack": "^5.28.0",
"react-codejar": "^1.1.2",
"ts-loader": "^9.2.8",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2"
},
"resolutions": {
"@types/react": "17.0.39"
},
"main": "dist/index.js",
"source": "./src/index.ts",
"module": "dist/index.js",
"main": "dist/bundle.js",
"types": "dist/index.d.ts"
}

View File

@ -2,11 +2,11 @@
"compilerOptions": {
"module": "commonjs",
"jsx": "react",
"resolveJsonModule": true,
"noImplicitAny": false,
"esModuleInterop": true,
"removeComments": true,
"preserveConstEnums": true,
"resolveJsonModule": true,
"outDir": "./dist",
"declarationDir": "./dist",
"declaration": true,

View File

@ -0,0 +1,26 @@
const path = require('path');
module.exports = {
mode: 'production',
entry: './src/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.js', '.tsx', '.ts'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
library: {
name: 'squiggle_components',
type: 'umd',
},
},
};

View File

@ -0,0 +1,11 @@
node_modules
shell.nix
.cache
.direnv
src
__tests__
lib
examples
yarn.nix
bsconfig.json
tsconfig.json

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
{
"name": "@squiggle/lang",
"version": "0.1.9",
"name": "@quri/squiggle-lang",
"version": "0.2.2",
"homepage": "https://foretold-app.github.io/estiband/",
"scripts": {
"build": "rescript build -with-deps",
"parcel": "parcel build ./src/js/index.js --no-source-maps --no-autoinstall",
"bundle": "tsc && webpack",
"start": "rescript build -w -with-deps",
"clean": "rescript clean",
"test": "jest",
@ -21,27 +21,29 @@
"license": "MIT",
"dependencies": {
"@glennsl/bs-json": "^5.0.2",
"@rescriptbr/reform": "^11.0.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"jstat": "^1.9.5",
"lodash": "4.17.15",
"mathjs": "5.10.3",
"pdfast": "^0.2.0",
"rationale": "0.2.0"
"rationale": "0.2.0",
"rescript": "^9.1.4"
},
"devDependencies": {
"@glennsl/rescript-jest": "^0.9.0",
"@types/jest": "^27.4.0",
"@types/webpack": "^5.28.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"docsify": "^4.12.2",
"gentype": "^4.3.0",
"jest": "^27.5.1",
"jstat": "1.9.2",
"moduleserve": "0.9.1",
"parcel": "^2.2.1",
"parcel-bundler": "1.12.4",
"rescript": "^9.1.4",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
"ts-loader": "^9.2.8",
"typescript": "^4.5.5",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2"
},
"main": "./dist/js/index.js",
"source": "./src/js/index.ts",
"main": "./dist/bundle.js",
"types": "./dist/js/index.d.ts"
}

View File

@ -12,5 +12,5 @@
},
"target": "ES6",
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
"exclude": ["node_modules", "**/*.spec.ts", "webpack.config.js"]
}

View File

@ -0,0 +1,26 @@
const path = require('path');
module.exports = {
mode: 'production',
entry: './src/js/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
library: {
name: 'squiggle_lang',
type: 'umd',
},
},
};

1537
yarn.lock

File diff suppressed because it is too large Load Diff