forked from storybookjs/storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworked placement of env setup according to feedback in storybookjs#…
- Loading branch information
Showing
14 changed files
with
28 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
require('../dist/server/build'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// Building for distribution defaults to production target. | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'; | ||
import { buildStatic } from '@storybook/core/server'; | ||
import options from './options'; | ||
|
||
// Note: We are importing via CommonJS to be able to adjust NODE_ENV | ||
// to production first before proceeding. This is required to correctly | ||
// e.g. selecting the `.env` files to import. It also helps with all ESM | ||
// imports which as some side-effect decide on things at "loadtime". | ||
const server = require('@storybook/core/server'); | ||
server.buildStatic(require('./options').default); | ||
buildStatic(options); |