@@ -41,161 +41,3 @@ Array [
41
41
"tslint.json",
42
42
]
43
43
` ;
44
-
45
- exports [` test ok: .babelrc.js 1` ] = `
46
- "const presets = [
47
- [
48
- '@babel/preset-env',
49
- {
50
- modules : process .env .NODE_ENV === ' es' ? false : ' commonjs'
51
- }
52
- ],
53
- '@babel/preset-react',
54
- '@babel/preset-typescript'
55
- ]
56
-
57
- const plugins = [
58
- '@babel/plugin-transform-runtime',
59
- '@babel/plugin-proposal-class-properties',
60
- '@babel/plugin-proposal-object-rest-spread'
61
- ]
62
-
63
- if (process.env.NODE_ENV === 'test') {
64
- plugins .push (' @babel/plugin-transform-modules-commonjs' )
65
- }
66
-
67
- module.exports = { presets , plugins }
68
- "
69
- ` ;
70
-
71
- exports [` test ok: readme.md content 1` ] = `
72
- "# One React Component: stub
73
-
74
-
75
- <p align =\\"center\\"><img width =\\"150\\" src =\\"https://cdn.rawgit.com/one-react/assets/master/logo%402x.png\\" alt =\\"logo\\"></p>
76
-
77
- [](https://travis-ci.org/one-react/stub)
78
- [](https://circleci.com/gh/one-react/stub)
79
- [](https://codecov.io/gh/one-react/stub)
80
- [](https://www.npmjs.com/package/or-stub)
81
- [](https://gitter.im/one-react-org/Lobby)
82
- [](https://opensource.org/licenses/MIT)
83
- [](https://standardjs.com)
84
- [](https://greenkeeper.io/)
85
-
86
- ## Installation
87
- \`\`\`
88
- // with npm
89
- npm install or-stub
90
-
91
- // with yarn
92
- yarn add or-stub
93
-
94
- \`\`\`
95
-
96
- ## Usage
97
- - Config webpack \`sass-loader\` if you are using webpack.
98
-
99
- \`\`\`js
100
- // webpack.config.js
101
- {
102
- test : / \\\\ . scss$ / ,
103
- use : [
104
- ' style-loader' ,
105
- ' css-loader' ,
106
- ' sass-loader'
107
- ],
108
- include : [
109
- / node_modules \\\\/ or\\\\ -\\\\ w+ / // include or-components
110
- ]
111
- }
112
- \`\`\`
113
-
114
- ## Basic Example
115
-
116
- ## API
117
- \`\`\`ts
118
- interface Props {
119
-
120
- }
121
- \`\`\`
122
-
123
- ## Customize Theme
124
- **Customize in webpack**
125
-
126
- The following variables in or-stub can be overridden:
127
-
128
- \`\`\`scss
129
- $or-btn-primary-color: $or-primary-color !default;
130
- ...
131
- \`\`\`
132
- For more variables, see [here](https://github.com/one-react/stub/blob/master/src/styles.scss).
133
-
134
- Alternatively, you can override variables from [or-theme](https://github.com/one-react/theme/blob/master/src/variables.scss) to keep all or-components in a unified theme style.
135
-
136
- First you should create a \`theme.scss\` file to declare the variables you want to override.
137
-
138
- Then use the [data](https://github.com/webpack-contrib/sass-loader#environment-variables) option provided by \`sass-loader\` to override the default values of the variables.
139
-
140
- We take a typical \`webpack.config.js\` file as example to customize it's sass-loader options.
141
-
142
- \`\`\`js
143
- // webpack.config.js
144
- {
145
- test : / \\\\ . scss$ / ,
146
- use : [
147
- ' style-loader' ,
148
- ' css-loader' ,
149
- {
150
- loader: ' sass-loader' ,
151
- options: {
152
- data: fs .readFileSync (path .resolve (__dirname , ' theme.scss' )) // pass theme.scss to sass-loader
153
- }
154
- }
155
- ],
156
- include : [
157
- / node_modules \\\\/ or\\\\ -\\\\ w+ / // include or-components
158
- ]
159
- }
160
- \`\`\`
161
-
162
- ## Demos and Docs
163
- > powered by [storybook](https://storybook.js.org/)
164
-
165
- [Click Here](https://one-react.github.io/stub)
166
-
167
- ## License
168
-
169
- MIT © placeholder
170
- "
171
- `;
172
-
173
- exports[`test ok: tsconfig.json 1`] = `
174
- "{
175
- \\" compilerOptions\\ " : {
176
- \\" target\\ " : \\" esnext\\ " ,
177
- \\" module\\ " : \\" commonjs\\ " ,
178
- \\" baseUrl\\ " : \\" ./src\\ " ,
179
- \\" declarationDir\\ " : \\" ./lib\\ " ,
180
- \\" declaration\\ " : true ,
181
- \\" allowSyntheticDefaultImports\\ " : true ,
182
- \\" esModuleInterop\\ " : true ,
183
- \\" jsx\\ " : \\" react\\ " ,
184
- \\" moduleResolution\\ " : \\" node\\ " ,
185
- \\" noUnusedLocals\\ " : true ,
186
- \\" noUnusedParameters\\ " : true ,
187
- \\" pretty\\ " : true ,
188
- \\" skipLibCheck\\ " : true ,
189
- \\" sourceMap\\ " : true ,
190
- \\" lib\\ " : [
191
- \\" esnext\\ " ,
192
- \\" es2015\\ " ,
193
- \\" dom\\ "
194
- ]
195
- },
196
- \\" include\\ " : [
197
- \\" src\\ "
198
- ]
199
- }
200
- "
201
- `;
0 commit comments