Skip to content

Commit

Permalink
Merge pull request #41 from gregoranders/development
Browse files Browse the repository at this point in the history
0.0.10 Release
  • Loading branch information
gregoranders authored Jun 15, 2020
2 parents 766c2ac + 264ebae commit af0a2fe
Show file tree
Hide file tree
Showing 8 changed files with 265 additions and 4 deletions.
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
| Version | Supported |
| ------- | ------------------ |
| 0.0.9 | :white_check_mark: |
| 0.0.8 | :white_check_mark: |
| 0.0.10 | :white_check_mark: |
| 0.0.9 | :x: |
| 0.0.8 | :x: |
| 0.0.7 | :x: |
| 0.0.6 | :x: |
| 0.0.5 | :x: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-react-playground",
"version": "0.0.9",
"version": "0.0.10",
"description": "TypeScript React Playground",
"scripts": {
"start": "webpack-dev-server --open --progress --config webpack.config.js",
Expand Down
12 changes: 12 additions & 0 deletions public/importmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"imports": {
"clsx": "/ts-react-playground/vendor/clsx.js",
"idb": "/ts-react-playground/vendor/idb.js",
"gsap": "/ts-react-playground/vendor/gsap.js",
"faker": "/ts-react-playground/vendor/faker.js",
"workbox-window": "/ts-react-playground/vendor/workbox-window.js",

Expand Down Expand Up @@ -35,6 +36,17 @@
"@fortawesome/free-brands-svg-icons": "/ts-react-playground/vendor/@fortawesome/free-brands-svg-icons.js",
"@fortawesome/react-fontawesome": "/ts-react-playground/vendor/@fortawesome/react-fontawesome.js",

"@material-ui/core": "/ts-react-playground/vendor/@material-ui/core.js",
"@material-ui/icons": "/ts-react-playground/vendor/@material-ui/icons.js",
"@material-ui/styles": "/ts-react-playground/vendor/@material-ui/styles.js",
"@material-ui/lab": "/ts-react-playground/vendor/@material-ui/lab.js",

"mdi-material-ui": "/ts-react-playground/vendor/mdi-material-ui.js",

"@devexpress/dx-react-core": "/ts-react-playground/vendor/@devexpress/dx-react-core.js",
"@devexpress/dx-react-chart": "/ts-react-playground/vendor/@devexpress/dx-react-chart.js",
"@devexpress/dx-react-chart-material-ui": "/ts-react-playground/vendor/@devexpress/dx-react-chart-material-ui.js",

"@app/index": "/ts-react-playground/script/index.js",
"@app/application": "/ts-react-playground/script/application.js",
"@app/loading": "/ts-react-playground/script/loading.js",
Expand Down
69 changes: 69 additions & 0 deletions src/vendor/rollup-devexpress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';

const isProd = process.env.NODE_ENV === 'production';

console.log('Production:', isProd);

const exported = [
{
name: '@devexpress/dx-react-core',
output: '@devexpress/dx-react-core',
external: ['react', 'react-is', 'react-dom', 'prop-types', '@material-ui/core', '@material-ui/styles'],
exports: {
'react-dom': Object.keys(require('react-dom')),
'@devexpress/dx-react-core': Object.keys(require('@devexpress/dx-react-core')),
},
},
{
name: '@devexpress/dx-react-chart',
output: '@devexpress/dx-react-chart',
external: ['react', 'react-is', 'react-dom', 'prop-types', '@material-ui/core', '@material-ui/styles'],
exports: {
'react-dom': Object.keys(require('react-dom')),
'@devexpress/dx-react-chart': Object.keys(require('@devexpress/dx-react-chart')),
},
},
{
name: '@devexpress/dx-react-chart-material-ui',
output: '@devexpress/dx-react-chart-material-ui',
external: ['react', 'react-is', 'react-dom', 'prop-types', '@material-ui/core', '@material-ui/styles'],
exports: {
'react-dom': Object.keys(require('react-dom')),
'@devexpress/dx-react-chart-material-ui': Object.keys(require('@devexpress/dx-react-chart-material-ui')),
},
},
].map(({ name, external, output }) => ({
input: `src/vendor/${name}/index.tsx`,
external,
output: [
{
file: output ? `public/vendor/${output}.js` : `public/vendor/${name}.js`,
format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm'
exports: 'named',
name,
sourcemap: isProd ? false : true,
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'),
}),
resolve({
preferBuiltins: false,
}),
json(),
typescript({
tsconfig: `src/vendor/${name}/tsconfig.json`,
}),
commonjs({
include: ['node_modules/**'],
}),
],
}));

export default [...exported];
50 changes: 50 additions & 0 deletions src/vendor/rollup-materialui-icons.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';

const isProd = process.env.NODE_ENV === 'production';

console.log('Production:', isProd);

const exported = [
{
name: '@material-ui/icons',
output: '@material-ui/icons',
external: ['react', 'react-is', '@material-ui/styles', 'prop-types'],
exports: {
'@material-ui/icons': Object.keys(require('@material-ui/icons')),
},
},
].map(({ name, external, output }) => ({
input: `src/vendor/${name}/index.tsx`,
external,
output: [
{
file: output ? `public/vendor/${output}.js` : `public/vendor/${name}.js`,
format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm'
exports: 'named',
name,
sourcemap: isProd ? false : true,
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'),
}),
resolve({
preferBuiltins: false,
}),
json(),
typescript({
tsconfig: `src/vendor/${name}/tsconfig.json`,
}),
commonjs({
include: ['node_modules/**'],
}),
],
}));

export default [...exported];
80 changes: 80 additions & 0 deletions src/vendor/rollup-materialui.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';

const isProd = process.env.NODE_ENV === 'production';

console.log('Production:', isProd);

const exported = [
{
name: '@material-ui/core',
output: '@material-ui/core',
external: ['react', 'react-is', 'react-dom', 'prop-types', '@material-ui/styles'],
exports: {
'@material-ui/core': Object.keys(require('@material-ui/core')),
},
},
{
name: '@material-ui/styles',
output: '@material-ui/styles',
external: ['react', 'react-is', 'prop-types'],
exports: {
'@material-ui/styles': Object.keys(require('@material-ui/styles')),
},
},
{
name: '@material-ui/lab',
output: '@material-ui/lab',
external: [
'react',
'react-is',
'react-dom',
'prop-types',
'@material-ui/core',
'@material-ui/icons',
'@material-ui/styles',
],
exports: {
'@material-ui/lab': Object.keys(require('@material-ui/lab')),
},
},
{
name: 'gsap',
external: [],

exports: {},
},
].map(({ name, external, output }) => ({
input: `src/vendor/${name}/index.tsx`,
external,
output: [
{
file: output ? `public/vendor/${output}.js` : `public/vendor/${name}.js`,
format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm'
exports: 'named',
name,
sourcemap: isProd ? false : true,
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'),
}),
resolve({
preferBuiltins: false,
}),
json(),
typescript({
tsconfig: `src/vendor/${name}/tsconfig.json`,
}),
commonjs({
include: ['node_modules/**'],
}),
],
}));

export default [...exported];
49 changes: 49 additions & 0 deletions src/vendor/rollup-mdi-material-ui.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';

const isProd = process.env.NODE_ENV === 'production';

console.log('Production:', isProd);

const exported = [
{
name: 'mdi-material-ui',
external: ['react', 'react-is', 'prop-types', '@material-ui/core', '@material-ui/styles'],
exports: {
'mdi-material-ui': Object.keys(require('mdi-material-ui')),
},
},
].map(({ name, external, output }) => ({
input: `src/vendor/${name}/index.tsx`,
external,
output: [
{
file: output ? `public/vendor/${output}.js` : `public/vendor/${name}.js`,
format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm'
exports: 'named',
name,
sourcemap: isProd ? false : true,
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'),
}),
resolve({
preferBuiltins: false,
}),
json(),
typescript({
tsconfig: `src/vendor/${name}/tsconfig.json`,
}),
commonjs({
include: ['node_modules/**'],
}),
],
}));

export default [...exported];

0 comments on commit af0a2fe

Please sign in to comment.