Skip to content

Commit

Permalink
fix(flow): rename src/index.js to gymnast.js (#374)
Browse files Browse the repository at this point in the history
Since webpack outputs a file called `gymnast.js`, the src file needs to be named the same so that when we output flow files, we get `gymnast.js` (webpack output) next to `gymnast.js.flow` (flow types generated from src).

Alternatively, we could update webpack to output a file named `index.js.
  • Loading branch information
arahansen authored Feb 23, 2018
1 parent b809329 commit 3eb2eee
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"module-resolver",
{
"alias": {
"gymnast": "./src"
"gymnast": "./src/gymnast"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[libs]

[options]
module.name_mapper='gymnast' -> '<PROJECT_ROOT>/src'
module.name_mapper='gymnast' -> '<PROJECT_ROOT>/dist/gymnast'
module.name_mapper.extension='txt' -> '<PROJECT_ROOT>/test/stringStub.js'
module.name_mapper.extension='md' -> '<PROJECT_ROOT>/test/stringStub.js'
module.ignore_non_literal_requires=true
Expand Down
2 changes: 1 addition & 1 deletion scripts/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const isProd = process.env.NODE_ENV === 'production'
const root = resolve(__dirname, '../dist')

module.exports = {
entry: resolve(__dirname, '../src'),
entry: resolve(__dirname, '../src/gymnast'),
output: {
path: root,
filename: isProd ? 'gymnast.min.js' : 'gymnast.js',
Expand Down
File renamed without changes.

0 comments on commit 3eb2eee

Please sign in to comment.