Skip to content

Commit de0c3d1

Browse files
authored
Modified build to support additional precompiled ES5 version (#43)
Precompiled ES5 Version
1 parent 6aeb414 commit de0c3d1

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Build
22
.circleci/
33
.storybook/
4+
linting/
45
node_modules/
56
*.tgz
67
tslint.json
@@ -30,4 +31,4 @@ src/**/*.test.*
3031
/test.config.ts
3132
/tsconfig.json
3233
/tslint.config
33-
/yarn.lock
34+
/yarn.lock

jest.config.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"collectCoverageFrom": [
33
"src/**/*.{js,jsx,ts,tsx}",
4+
"!src/**/__snapshots__/**/*.*",
45
"!src/__utils__/**/*.*",
56
"!src/**/*.story.{js,jsx,ts,tsx}"
67
],

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "react-rasta",
33
"version": "1.0.0",
44
"description": "The most powerful and flexible grid system for React",
5-
"main": "./lib/index.js",
6-
"types": "./lib/index.d.ts",
5+
"main": "./lib/es6/index.js",
6+
"types": "./lib/es6/index.d.ts",
77
"maintainers": ["Rafael Staib"],
88
"repository": {
99
"type": "git",
@@ -13,7 +13,8 @@
1313
"license": "MIT",
1414
"keywords": ["grid", "layout", "css", "flexbox"],
1515
"scripts": {
16-
"build": "yarn prettier && yarn lint && yarn test:coverage && tsc",
16+
"build":
17+
"yarn prettier && yarn lint && yarn test:coverage && (tsc & tsc -p ./tsconfig.es5.json)",
1718
"build-storybook": "build-storybook",
1819
"cover": "coveralls < coverage/lcov.info",
1920
"lint": "yarn lint:code && yarn lint:style",

src/theme/__snapshots__/ThemeProvider.test.tsx.snap

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`<ThemeProvider /> should match the snapshot (gutterWidth set to 100) 1`] = `
3+
exports[
4+
`<ThemeProvider /> should match the snapshot (gutterWidth set to 100) 1`
5+
] = `
46
.c3 {
57
position: relative;
68
width: 100%;

tsconfig.es5.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "lib/es5",
5+
"target": "es5"
6+
}
7+
}

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"outDir": "lib",
3+
"outDir": "lib/es6",
44
"module": "commonjs",
55
"target": "es6",
66
"lib": ["esnext", "dom"],

0 commit comments

Comments
 (0)