Skip to content

Commit

Permalink
Modified build to support additional precompiled ES5 version (#43)
Browse files Browse the repository at this point in the history
Precompiled ES5 Version
  • Loading branch information
rstaib authored Aug 29, 2018
1 parent 6aeb414 commit de0c3d1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Build
.circleci/
.storybook/
linting/
node_modules/
*.tgz
tslint.json
Expand Down Expand Up @@ -30,4 +31,4 @@ src/**/*.test.*
/test.config.ts
/tsconfig.json
/tslint.config
/yarn.lock
/yarn.lock
1 change: 1 addition & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/__snapshots__/**/*.*",
"!src/__utils__/**/*.*",
"!src/**/*.story.{js,jsx,ts,tsx}"
],
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "react-rasta",
"version": "1.0.0",
"description": "The most powerful and flexible grid system for React",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"main": "./lib/es6/index.js",
"types": "./lib/es6/index.d.ts",
"maintainers": ["Rafael Staib"],
"repository": {
"type": "git",
Expand All @@ -13,7 +13,8 @@
"license": "MIT",
"keywords": ["grid", "layout", "css", "flexbox"],
"scripts": {
"build": "yarn prettier && yarn lint && yarn test:coverage && tsc",
"build":
"yarn prettier && yarn lint && yarn test:coverage && (tsc & tsc -p ./tsconfig.es5.json)",
"build-storybook": "build-storybook",
"cover": "coveralls < coverage/lcov.info",
"lint": "yarn lint:code && yarn lint:style",
Expand Down
4 changes: 3 additions & 1 deletion src/theme/__snapshots__/ThemeProvider.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<ThemeProvider /> should match the snapshot (gutterWidth set to 100) 1`] = `
exports[
`<ThemeProvider /> should match the snapshot (gutterWidth set to 100) 1`
] = `
.c3 {
position: relative;
width: 100%;
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.es5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib/es5",
"target": "es5"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/es6",
"module": "commonjs",
"target": "es6",
"lib": ["esnext", "dom"],
Expand Down

0 comments on commit de0c3d1

Please sign in to comment.