mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-17 05:02:23 +08:00
Merge branch 'master' into info-params
This commit is contained in:
commit
bb3c5bf781
@ -29,7 +29,7 @@
|
||||
"@storybook/client-logger": "4.0.0-alpha.8",
|
||||
"@storybook/components": "4.0.0-alpha.8",
|
||||
"@storybook/core-events": "4.0.0-alpha.8",
|
||||
"axe-core": "^3.0.2",
|
||||
"axe-core": "^3.0.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"emotion": "^9.1.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -76,6 +76,14 @@ const Wrapper = styled('div')({
|
||||
width: '100%',
|
||||
});
|
||||
|
||||
function getJSONFromString(str) {
|
||||
try {
|
||||
return JSON.parse(str);
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
class Item extends Component {
|
||||
static propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
@ -89,13 +97,9 @@ class Item extends Component {
|
||||
payload: {},
|
||||
};
|
||||
|
||||
static getJSONFromString(str) {
|
||||
try {
|
||||
return JSON.parse(str);
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
state = {
|
||||
isTextAreaShowed: false,
|
||||
};
|
||||
|
||||
static getDerivedStateFromProps = ({ payload }, { prevPayload }) => {
|
||||
if (payload !== prevPayload) {
|
||||
@ -103,7 +107,7 @@ class Item extends Component {
|
||||
|
||||
return {
|
||||
failed: false,
|
||||
payload: Item.getJSONFromString(payloadString),
|
||||
payload: getJSONFromString(payloadString),
|
||||
payloadString,
|
||||
prevPayload,
|
||||
};
|
||||
@ -111,10 +115,6 @@ class Item extends Component {
|
||||
return null;
|
||||
};
|
||||
|
||||
state = {
|
||||
isTextAreaShowed: false,
|
||||
};
|
||||
|
||||
onChange = ({ target: { value } }) => {
|
||||
const newState = {
|
||||
payloadString: value,
|
||||
|
@ -40,7 +40,7 @@ but this can mean you'll experience merge conflicts on this file in the future.
|
||||
|
||||
## Generating the test results
|
||||
|
||||
You need to make sure the generated test-restuls file exists before you start storybook.
|
||||
You need to make sure the generated test-results file exists before you start storybook.
|
||||
During development you will likely start jest in watch-mode
|
||||
and so the json file will be re-generated every time code or tests change.
|
||||
|
||||
@ -116,7 +116,7 @@ storiesOf('MyComponent', module)
|
||||
### withTests(options)
|
||||
|
||||
- **options.results**: OBJECT jest output results. *mandatory*
|
||||
- **filesExt**: STRING test file extention. *optionnal*. This allow you to write "MyComponent" and not "MyComponent.test.js". It will be used as regex to find your file results. Default value is `((\\.specs?)|(\\.tests?))?(\\.js)?$`. That mean it will match: MyComponent.js, MyComponent.test.js, MyComponent.tests.js, MyComponent.spec.js, MyComponent.specs.js...
|
||||
- **filesExt**: STRING test file extention. *optional*. This allow you to write "MyComponent" and not "MyComponent.test.js". It will be used as regex to find your file results. Default value is `((\\.specs?)|(\\.tests?))?(\\.js)?$`. That mean it will match: MyComponent.js, MyComponent.test.js, MyComponent.tests.js, MyComponent.spec.js, MyComponent.specs.js...
|
||||
|
||||
## Usage with Angular
|
||||
|
||||
|
@ -64,8 +64,8 @@ const SuiteTotals = styled(({ successNumber, failedNumber, result, className })
|
||||
|
||||
const SuiteProgress = styled(({ successNumber, result, className }) => (
|
||||
<div className={className} role="progressbar">
|
||||
<span style={{ width: `${successNumber / result.assertionResults.length * 100}%` }}>
|
||||
{`${successNumber / result.assertionResults.length * 100}%`}
|
||||
<span style={{ width: `${(successNumber / result.assertionResults.length) * 100}%` }}>
|
||||
{`${(successNumber / result.assertionResults.length) * 100}%`}
|
||||
</span>
|
||||
</div>
|
||||
))(() => ({
|
||||
|
@ -22,7 +22,7 @@
|
||||
"global": "^4.3.2",
|
||||
"insert-css": "^2.0.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"moment": "^2.22.1",
|
||||
"moment": "^2.22.2",
|
||||
"prop-types": "^15.6.1",
|
||||
"react-color": "^2.14.1",
|
||||
"react-datetime": "^2.14.0",
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Storybook Addon Notes
|
||||
|
||||
[](https://circleci.com/gh/storybooks/storybook)
|
||||
[](https://www.codefactor.io/repository/github/storybooks/storybook)
|
||||
[](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
|
||||
@ -16,6 +15,7 @@ Storybook Addon Notes allows you to write notes (text or HTML) for your stories
|
||||

|
||||
|
||||
### Getting Started
|
||||
**NOTE: Documentation on master branch is for alpha version, stable release is on [release/3.4](https://github.com/storybooks/storybook/tree/release/3.4/addons/)**
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-notes
|
||||
|
@ -25,7 +25,7 @@
|
||||
"babel-runtime": "^6.26.0",
|
||||
"estraverse": "^4.2.0",
|
||||
"loader-utils": "^1.1.0",
|
||||
"prettier": "~1.12.1",
|
||||
"prettier": "^1.13.4",
|
||||
"prop-types": "^15.6.1",
|
||||
"react-syntax-highlighter": "^7.0.4"
|
||||
},
|
||||
|
@ -44,31 +44,27 @@ const styles = {
|
||||
},
|
||||
};
|
||||
|
||||
const areLocationsEqual = (a, b) =>
|
||||
a.startLoc.line === b.startLoc.line &&
|
||||
a.startLoc.col === b.startLoc.col &&
|
||||
a.endLoc.line === b.endLoc.line &&
|
||||
a.endLoc.col === b.endLoc.col;
|
||||
|
||||
const getLocationKeys = locationsMap =>
|
||||
locationsMap
|
||||
? Array.from(Object.keys(locationsMap)).sort(
|
||||
(key1, key2) => locationsMap[key1].startLoc.line - locationsMap[key2].startLoc.line
|
||||
)
|
||||
: [];
|
||||
|
||||
export default class StoryPanel extends Component {
|
||||
static areLocationsEqual(a, b) {
|
||||
return (
|
||||
a.startLoc.line === b.startLoc.line &&
|
||||
a.startLoc.col === b.startLoc.col &&
|
||||
a.endLoc.line === b.endLoc.line &&
|
||||
a.endLoc.col === b.endLoc.col
|
||||
);
|
||||
}
|
||||
|
||||
static getLocationKeys(locationsMap) {
|
||||
return locationsMap
|
||||
? Array.from(Object.keys(locationsMap)).sort(
|
||||
(key1, key2) => locationsMap[key1].startLoc.line - locationsMap[key2].startLoc.line
|
||||
)
|
||||
: [];
|
||||
}
|
||||
|
||||
state = { source: '// Here will be dragons 🐉' };
|
||||
|
||||
componentDidMount() {
|
||||
const { channel } = this.props;
|
||||
|
||||
channel.on(EVENT_ID, ({ source, currentLocation, locationsMap }) => {
|
||||
const locationsKeys = StoryPanel.getLocationKeys(locationsMap);
|
||||
const locationsKeys = getLocationKeys(locationsMap);
|
||||
|
||||
this.setState({
|
||||
source,
|
||||
@ -116,7 +112,7 @@ export default class StoryPanel extends Component {
|
||||
const story = this.createPart(storyRows, stylesheet, useInlineStyles);
|
||||
const storyKey = `${first}-${last}`;
|
||||
|
||||
if (StoryPanel.areLocationsEqual(location, currentLocation)) {
|
||||
if (areLocationsEqual(location, currentLocation)) {
|
||||
return (
|
||||
<div key={storyKey} ref={this.setSelectedStoryRef} style={styles.selectedStory}>
|
||||
{story}
|
||||
|
@ -27,14 +27,26 @@ function generateSourceWithoutUglyComments(source, { comments, uglyCommentsRegex
|
||||
return parts.join('');
|
||||
}
|
||||
|
||||
function prettifyCode(source, { prettierConfig, parser }) {
|
||||
function prettifyCode(source, { prettierConfig, parser, filepath }) {
|
||||
let config = prettierConfig;
|
||||
|
||||
if (!config.parser && parser && parser !== 'javascript') {
|
||||
config = {
|
||||
...prettierConfig,
|
||||
parser,
|
||||
};
|
||||
if (!config.parser) {
|
||||
if (parser) {
|
||||
config = {
|
||||
...prettierConfig,
|
||||
parser: parser === 'javascript' ? 'babylon' : parser,
|
||||
};
|
||||
} else if (filepath) {
|
||||
config = {
|
||||
...prettierConfig,
|
||||
filepath,
|
||||
};
|
||||
} else {
|
||||
config = {
|
||||
...prettierConfig,
|
||||
parser: 'babylon',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return prettier.format(source, config);
|
||||
|
@ -5,7 +5,7 @@ const ADD_DECORATOR_STATEMENT = '.addDecorator(withStorySource(__STORY__, __ADDS
|
||||
|
||||
function transform(source) {
|
||||
const options = getOptions(this) || {};
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT, options);
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT, this.resourcePath, options);
|
||||
|
||||
if (!result.changed) {
|
||||
return source;
|
||||
|
@ -6,16 +6,17 @@ import {
|
||||
generateAddsMap,
|
||||
} from './generate-helpers';
|
||||
|
||||
function extendOptions(source, comments, options) {
|
||||
function extendOptions(source, comments, filepath, options) {
|
||||
return {
|
||||
...defaultOptions,
|
||||
...options,
|
||||
source,
|
||||
comments,
|
||||
filepath,
|
||||
};
|
||||
}
|
||||
|
||||
function inject(source, decorator, options = {}) {
|
||||
function inject(source, decorator, filepath, options = {}) {
|
||||
const { changed, source: newSource, comments } = generateSourceWithDecorators(
|
||||
source,
|
||||
decorator,
|
||||
@ -30,7 +31,7 @@ function inject(source, decorator, options = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
const storySource = generateStorySource(extendOptions(source, comments, options));
|
||||
const storySource = generateStorySource(extendOptions(source, comments, filepath, options));
|
||||
const addsMap = generateAddsMap(storySource, options.parser);
|
||||
|
||||
return {
|
||||
|
@ -1,12 +1,19 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import injectDecorator from './inject-decorator';
|
||||
|
||||
const ADD_DECORATOR_STATEMENT = '.addDecorator(withStorySource(__STORY__, __ADDS_MAP__))';
|
||||
|
||||
describe('inject-decorator', () => {
|
||||
describe('positive', () => {
|
||||
const source = fs.readFileSync('./__mocks__/inject-decorator.stories.txt', 'utf-8');
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT);
|
||||
const mockFilePath = './__mocks__/inject-decorator.stories.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath),
|
||||
{ parser: 'javascript' }
|
||||
);
|
||||
|
||||
it('returns "changed" flag', () => {
|
||||
expect(result.changed).toBeTruthy();
|
||||
@ -22,8 +29,14 @@ describe('inject-decorator', () => {
|
||||
});
|
||||
|
||||
describe('positive - angular', () => {
|
||||
const source = fs.readFileSync('./__mocks__/inject-decorator.angular-stories.txt', 'utf-8');
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT, { parser: 'typescript' });
|
||||
const mockFilePath = './__mocks__/inject-decorator.angular-stories.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath),
|
||||
{ parser: 'typescript' }
|
||||
);
|
||||
|
||||
it('returns "changed" flag', () => {
|
||||
expect(result.changed).toBeTruthy();
|
||||
@ -39,8 +52,14 @@ describe('inject-decorator', () => {
|
||||
});
|
||||
|
||||
describe('positive - ts', () => {
|
||||
const source = fs.readFileSync('./__mocks__/inject-decorator.ts.txt', 'utf-8');
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT, { parser: 'typescript' });
|
||||
const mockFilePath = './__mocks__/inject-decorator.ts.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath),
|
||||
{ parser: 'typescript' }
|
||||
);
|
||||
|
||||
it('returns "changed" flag', () => {
|
||||
expect(result.changed).toBeTruthy();
|
||||
@ -56,11 +75,14 @@ describe('inject-decorator', () => {
|
||||
});
|
||||
|
||||
describe('stories with ugly comments', () => {
|
||||
const source = fs.readFileSync(
|
||||
'./__mocks__/inject-decorator.ugly-comments-stories.txt',
|
||||
'utf-8'
|
||||
const mockFilePath = './__mocks__/inject-decorator.ugly-comments-stories.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath),
|
||||
{ parser: 'javascript' }
|
||||
);
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT);
|
||||
|
||||
it('should delete ugly comments from the generated story source', () => {
|
||||
expect(result.storySource).toMatchSnapshot();
|
||||
@ -68,11 +90,14 @@ describe('inject-decorator', () => {
|
||||
});
|
||||
|
||||
describe('stories with ugly comments in ts', () => {
|
||||
const source = fs.readFileSync(
|
||||
'./__mocks__/inject-decorator.ts.ugly-comments-stories.txt',
|
||||
'utf-8'
|
||||
const mockFilePath = './__mocks__/inject-decorator.ts.ugly-comments-stories.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath),
|
||||
{ parser: 'typescript' }
|
||||
);
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT, { parser: 'typescript' });
|
||||
|
||||
it('should delete ugly comments from the generated story source', () => {
|
||||
expect(result.storySource).toMatchSnapshot();
|
||||
@ -80,9 +105,14 @@ describe('inject-decorator', () => {
|
||||
});
|
||||
|
||||
it('will not change the source when there are no "storiesOf" functions', () => {
|
||||
const source = fs.readFileSync('./__mocks__/inject-decorator.no-stories.txt', 'utf-8');
|
||||
const mockFilePath = './__mocks__/inject-decorator.no-stories.txt';
|
||||
const source = fs.readFileSync(mockFilePath, 'utf-8');
|
||||
|
||||
const result = injectDecorator(source, ADD_DECORATOR_STATEMENT);
|
||||
const result = injectDecorator(
|
||||
source,
|
||||
ADD_DECORATOR_STATEMENT,
|
||||
path.resolve(__dirname, mockFilePath)
|
||||
);
|
||||
|
||||
expect(result.changed).toBeFalsy();
|
||||
expect(result.addsMap).toEqual({});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import parseJs from 'prettier/parser-babylon';
|
||||
|
||||
function parse(source) {
|
||||
return parseJs(source);
|
||||
return parseJs.parsers.babylon.parse(source);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import parseTs from 'prettier/parser-typescript';
|
||||
|
||||
function parse(source) {
|
||||
return parseTs(source);
|
||||
return parseTs.parsers.typescript.parse(source);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -35,16 +35,16 @@ const getViewports = viewports =>
|
||||
const setStoryDefaultViewportWait = 100;
|
||||
|
||||
export class Panel extends Component {
|
||||
static propTypes = {
|
||||
channel: PropTypes.shape({}).isRequired,
|
||||
api: PropTypes.shape({}).isRequired,
|
||||
};
|
||||
|
||||
static defaultOptions = {
|
||||
viewports: INITIAL_VIEWPORTS,
|
||||
defaultViewport: DEFAULT_VIEWPORT,
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
channel: PropTypes.shape({}).isRequired,
|
||||
api: PropTypes.shape({}).isRequired,
|
||||
};
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
|
@ -30,16 +30,17 @@
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0",
|
||||
"sass-loader": "^7.0.1",
|
||||
"ts-loader": "^4.3.0",
|
||||
"sass-loader": "^7.0.2",
|
||||
"ts-loader": "^4.3.1",
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": ">=4.0.0",
|
||||
"@angular/compiler": ">=4.0.0",
|
||||
"@angular/core": ">=4.0.0",
|
||||
"@angular/forms": ">=4.0.0",
|
||||
"@angular/platform-browser": ">=4.0.0",
|
||||
"@angular/platform-browser-dynamic": ">=4.0.0"
|
||||
"@angular-devkit/core": "^0.6.1",
|
||||
"@angular/common": ">=6.0.0",
|
||||
"@angular/compiler": ">=6.0.0",
|
||||
"@angular/core": ">=6.0.0",
|
||||
"@angular/forms": ">=6.0.0",
|
||||
"@angular/platform-browser": ">=6.0.0",
|
||||
"@angular/platform-browser-dynamic": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
66
app/angular/src/server/angular-cli_config.js
vendored
66
app/angular/src/server/angular-cli_config.js
vendored
@ -1,49 +1,63 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { logger } from '@storybook/node-logger';
|
||||
import { isBuildAngularInstalled, normalizeAssetPatterns } from './angular-cli_utils';
|
||||
|
||||
function isAngularCliInstalled() {
|
||||
try {
|
||||
require.resolve('@angular/cli');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export function getAngularCliWebpackConfigOptions(dirToSearch) {
|
||||
const fname = path.join(dirToSearch, 'angular.json');
|
||||
|
||||
export function getAngularCliWebpackConfigOptions(dirToSearch, appIndex = 0) {
|
||||
const fname = path.join(dirToSearch, '.angular-cli.json');
|
||||
if (!fs.existsSync(fname)) {
|
||||
return null;
|
||||
}
|
||||
const cliConfig = JSON.parse(fs.readFileSync(fname, 'utf8'));
|
||||
if (!cliConfig.apps || !cliConfig.apps.length) {
|
||||
throw new Error('.angular-cli.json must have apps entry.');
|
||||
|
||||
const angularJson = JSON.parse(fs.readFileSync(fname, 'utf8'));
|
||||
const { projects, defaultProject } = angularJson;
|
||||
|
||||
if (!projects || !Object.keys(projects).length) {
|
||||
throw new Error('angular.json must have projects entry.');
|
||||
}
|
||||
const appConfig = cliConfig.apps[appIndex];
|
||||
|
||||
const cliWebpackConfigOptions = {
|
||||
let project = projects[Object.keys(projects)[0]];
|
||||
|
||||
if (defaultProject) {
|
||||
project = projects[defaultProject];
|
||||
}
|
||||
|
||||
const { options: projectOptions } = project.architect.build;
|
||||
|
||||
const normalizedAssets = normalizeAssetPatterns(
|
||||
projectOptions.assets,
|
||||
dirToSearch,
|
||||
project.sourceRoot
|
||||
);
|
||||
|
||||
return {
|
||||
root: project.root,
|
||||
projectRoot: dirToSearch,
|
||||
appConfig,
|
||||
buildOptions: {
|
||||
outputPath: 'outputPath', // It's dummy value to avoid to Angular CLI's error
|
||||
},
|
||||
supportES2015: false,
|
||||
tsConfig: {
|
||||
options: {},
|
||||
fileNames: [],
|
||||
errors: [],
|
||||
},
|
||||
tsConfigPath: path.resolve(dirToSearch, 'src/tsconfig.app.json'),
|
||||
buildOptions: {
|
||||
...projectOptions,
|
||||
assets: normalizedAssets,
|
||||
},
|
||||
};
|
||||
|
||||
return cliWebpackConfigOptions;
|
||||
}
|
||||
|
||||
export function applyAngularCliWebpackConfig(baseConfig, cliWebpackConfigOptions) {
|
||||
if (!cliWebpackConfigOptions) return baseConfig;
|
||||
|
||||
if (!isAngularCliInstalled()) {
|
||||
logger.info('=> Using base config because @angular/cli is not installed.');
|
||||
if (!isBuildAngularInstalled()) {
|
||||
logger.info('=> Using base config because @angular-devkit/build-angular is not installed.');
|
||||
return baseConfig;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
|
||||
const ngcliConfigFactory = require('@angular/cli/models/webpack-configs');
|
||||
const ngcliConfigFactory = require('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs');
|
||||
|
||||
let cliCommonConfig;
|
||||
let cliStyleConfig;
|
||||
@ -56,8 +70,8 @@ export function applyAngularCliWebpackConfig(baseConfig, cliWebpackConfigOptions
|
||||
}
|
||||
logger.info('=> Get angular-cli webpack config.');
|
||||
|
||||
// Don't use storybooks .css/.scss rules because we have to use rules created by @angualr/cli
|
||||
// because @angular/cli created rules have include/exclude for global style files.
|
||||
// Don't use storybooks .css/.scss rules because we have to use rules created by @angular-devkit/build-angular
|
||||
// because @angular-devkit/build-angular created rules have include/exclude for global style files.
|
||||
const rulesExcludingStyles = baseConfig.module.rules.filter(
|
||||
rule =>
|
||||
!rule.test || (rule.test.toString() !== '/\\.css$/' && rule.test.toString() !== '/\\.scss$/')
|
||||
|
55
app/angular/src/server/angular-cli_utils.js
vendored
Normal file
55
app/angular/src/server/angular-cli_utils.js
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
import fs from 'fs';
|
||||
import { basename, dirname, normalize, relative, resolve } from '@angular-devkit/core';
|
||||
|
||||
function isDirectory(assetPath) {
|
||||
try {
|
||||
return fs.statSync(assetPath).isDirectory();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getAssetsParts(resolvedAssetPath, assetPath) {
|
||||
if (isDirectory(resolvedAssetPath)) {
|
||||
return {
|
||||
glob: '**/*', // Folders get a recursive star glob.
|
||||
input: assetPath, // Input directory is their original path.
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
glob: basename(assetPath), // Files are their own glob.
|
||||
input: dirname(assetPath), // Input directory is their original dirname.
|
||||
};
|
||||
}
|
||||
|
||||
export function isBuildAngularInstalled() {
|
||||
try {
|
||||
require.resolve('@angular-devkit/build-angular');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function normalizeAssetPatterns(assetPatterns, dirToSearch, sourceRoot) {
|
||||
if (!assetPatterns || !assetPatterns.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return assetPatterns.map(assetPattern => {
|
||||
const assetPath = normalize(assetPattern);
|
||||
const resolvedSourceRoot = resolve(dirToSearch, sourceRoot);
|
||||
const resolvedAssetPath = resolve(dirToSearch, assetPath);
|
||||
const parts = getAssetsParts(resolvedAssetPath, assetPath);
|
||||
|
||||
// Output directory for both is the relative path from source root to input.
|
||||
const output = relative(resolvedSourceRoot, resolve(dirToSearch, parts.input));
|
||||
|
||||
// Return the asset pattern in object format.
|
||||
return {
|
||||
...parts,
|
||||
output,
|
||||
};
|
||||
});
|
||||
}
|
4
app/angular/src/server/wrapInitialConfig.js
vendored
4
app/angular/src/server/wrapInitialConfig.js
vendored
@ -16,6 +16,10 @@ export default (config, configDir) => ({
|
||||
require.resolve('angular2-template-loader'),
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /[/\\]@angular[/\\]core[/\\].+\.js$/,
|
||||
parser: { system: true },
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'raw-loader',
|
||||
|
@ -32,7 +32,7 @@
|
||||
"@storybook/react-dev-utils": "^5.0.0",
|
||||
"@storybook/ui": "4.0.0-alpha.8",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-plugin-macros": "^2.2.1",
|
||||
"babel-plugin-macros": "^2.2.2",
|
||||
"babel-plugin-syntax-async-functions": "^6.13.0",
|
||||
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
@ -47,7 +47,7 @@
|
||||
"babel-runtime": "^6.26.0",
|
||||
"case-sensitive-paths-webpack-plugin": "^2.1.2",
|
||||
"commander": "^2.15.1",
|
||||
"dotenv-webpack": "^1.5.5",
|
||||
"dotenv-webpack": "^1.5.6",
|
||||
"express": "^4.16.3",
|
||||
"find-cache-dir": "^1.0.0",
|
||||
"global": "^4.3.2",
|
||||
@ -60,7 +60,7 @@
|
||||
"shelljs": "^0.8.2",
|
||||
"url-parse": "^1.4.0",
|
||||
"uuid": "^3.2.1",
|
||||
"webpack": "^4.9.2",
|
||||
"webpack": "^4.10.2",
|
||||
"webpack-dev-middleware": "^3.1.3",
|
||||
"webpack-hot-middleware": "^2.22.2",
|
||||
"ws": "^5.2.0"
|
||||
|
@ -107,7 +107,7 @@ First follow the instructions [here](https://github.com/ds300/react-native-types
|
||||
Now update your storybook `package.json` script to the following
|
||||
|
||||
"scripts": {
|
||||
"storybook": "storybook start -p 7007 --metro-config $PWD/rn-cli.config.js"
|
||||
"storybook": "storybook --metro-config $PWD/rn-cli.config.js"
|
||||
}
|
||||
|
||||
The metro bundler requires an absolute path to the config. The above setup assumes the `rn-cli.config.js` is in the root of your project or next to your `package.json`
|
||||
|
@ -35,7 +35,7 @@ collectors:
|
||||
settings:
|
||||
batch_mode: true
|
||||
batch_bootstrap: true
|
||||
bootstrap_command: yarn --ignore-scripts --ignore-engines --silent
|
||||
bootstrap_command: yarn --ignore-scripts --ignore-engines --silent && yarn lint:ts . --fix && yarn lint:js . --fix
|
||||
github_labels:
|
||||
- dependencies:update
|
||||
github_assignees:
|
||||
|
@ -24,16 +24,16 @@
|
||||
"@storybook/react": "^3.4.6",
|
||||
"babel-loader": "^6.4.1",
|
||||
"bootstrap": "^3.3.7",
|
||||
"gatsby": "^1.9.261",
|
||||
"gatsby": "^1.9.270",
|
||||
"gatsby-link": "^1.6.44",
|
||||
"gatsby-plugin-sharp": "^1.6.44",
|
||||
"gatsby-plugin-sharp": "^1.6.47",
|
||||
"gatsby-remark-autolink-headers": "^1.4.18",
|
||||
"gatsby-remark-copy-linked-files": "^1.5.32",
|
||||
"gatsby-remark-images": "^1.5.63",
|
||||
"gatsby-remark-copy-linked-files": "^1.5.35",
|
||||
"gatsby-remark-images": "^1.5.66",
|
||||
"gatsby-remark-smartypants": "^1.4.12",
|
||||
"gatsby-source-filesystem": "^1.5.36",
|
||||
"gatsby-transformer-remark": "^1.7.41",
|
||||
"gh-pages": "^1.1.0",
|
||||
"gatsby-source-filesystem": "^1.5.38",
|
||||
"gatsby-transformer-remark": "^1.7.42",
|
||||
"gh-pages": "^1.2.0",
|
||||
"global": "^4.3.2",
|
||||
"highlight.js": "^9.12.0",
|
||||
"lodash": "^4.17.10",
|
||||
@ -43,7 +43,7 @@
|
||||
"react-document-title": "^2.0.3",
|
||||
"react-dom": "^15.6.1",
|
||||
"react-helmet": "^5.0.3",
|
||||
"react-router": "^4.2.0",
|
||||
"react-router": "^4.3.1",
|
||||
"react-stack-grid": "^0.7.1",
|
||||
"sitemap": "^1.12.0"
|
||||
},
|
||||
|
151
docs/yarn.lock
151
docs/yarn.lock
@ -623,11 +623,11 @@ async-each@^1.0.0, async-each@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
|
||||
|
||||
async@2.6.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
|
||||
async@2.6.1:
|
||||
version "2.6.1"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610"
|
||||
dependencies:
|
||||
lodash "^4.14.0"
|
||||
lodash "^4.17.10"
|
||||
|
||||
async@^0.9.0:
|
||||
version "0.9.2"
|
||||
@ -1751,10 +1751,6 @@ base64id@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6"
|
||||
|
||||
base64url@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb"
|
||||
|
||||
base@^0.11.1:
|
||||
version "0.11.2"
|
||||
resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
|
||||
@ -2628,23 +2624,23 @@ command-exists@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.2.tgz#12819c64faf95446ec0ae07fe6cafb6eb3708b22"
|
||||
|
||||
commander@2.11.0, commander@^2.11.0, commander@^2.9.0:
|
||||
version "2.11.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||
|
||||
commander@2.12.x, commander@~2.12.1:
|
||||
version "2.12.2"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
|
||||
|
||||
commander@2.15.1, commander@^2.15.0:
|
||||
version "2.15.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
|
||||
|
||||
commander@2.9.0, commander@2.9.x:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||
dependencies:
|
||||
graceful-readlink ">= 1.0.0"
|
||||
|
||||
commander@^2.15.0:
|
||||
version "2.15.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
|
||||
commander@^2.11.0, commander@^2.9.0:
|
||||
version "2.11.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||
|
||||
commander@~2.8.1:
|
||||
version "2.8.1"
|
||||
@ -3633,6 +3629,10 @@ entities@^1.1.1, entities@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
|
||||
|
||||
envinfo@^5.8.1:
|
||||
version "5.10.0"
|
||||
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-5.10.0.tgz#503a9774ae15b93ea68bdfae2ccd6306624ea6df"
|
||||
|
||||
eol@^0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/eol/-/eol-0.8.1.tgz#defc3224990c7eca73bb34461a56cf9dc24761d0"
|
||||
@ -4233,7 +4233,14 @@ filename-reserved-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
|
||||
|
||||
filenamify@^1.0.1:
|
||||
filenamify-url@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/filenamify-url/-/filenamify-url-1.0.0.tgz#b32bd81319ef5863b73078bed50f46a4f7975f50"
|
||||
dependencies:
|
||||
filenamify "^1.0.0"
|
||||
humanize-url "^1.0.0"
|
||||
|
||||
filenamify@^1.0.0, filenamify@^1.0.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
|
||||
dependencies:
|
||||
@ -4479,7 +4486,7 @@ fs-exists-sync@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
|
||||
|
||||
fs-extra@4.0.2, fs-extra@^4.0.1, fs-extra@^4.0.2:
|
||||
fs-extra@4.0.2, fs-extra@^4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b"
|
||||
dependencies:
|
||||
@ -4487,6 +4494,14 @@ fs-extra@4.0.2, fs-extra@^4.0.1, fs-extra@^4.0.2:
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-extra@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd"
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-minipass@^1.2.3:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
|
||||
@ -4567,9 +4582,9 @@ gatsby-1-config-extract-plugin@^1.0.3:
|
||||
babel-runtime "^6.26.0"
|
||||
extract-text-webpack-plugin "^1.0.1"
|
||||
|
||||
gatsby-cli@^1.1.52:
|
||||
version "1.1.52"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-cli/-/gatsby-cli-1.1.52.tgz#1bb09671b774a49202ea5bb90aa49bfeebaa2fc3"
|
||||
gatsby-cli@^1.1.58:
|
||||
version "1.1.58"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-cli/-/gatsby-cli-1.1.58.tgz#5dda246b9877ab925f6a512f723c20557af22d57"
|
||||
dependencies:
|
||||
babel-code-frame "^6.26.0"
|
||||
babel-runtime "^6.26.0"
|
||||
@ -4577,6 +4592,7 @@ gatsby-cli@^1.1.52:
|
||||
common-tags "^1.4.0"
|
||||
convert-hrtime "^2.0.0"
|
||||
core-js "^2.5.0"
|
||||
envinfo "^5.8.1"
|
||||
execa "^0.8.0"
|
||||
fs-extra "^4.0.1"
|
||||
hosted-git-info "^2.5.0"
|
||||
@ -4606,9 +4622,9 @@ gatsby-module-loader@^1.0.11:
|
||||
babel-runtime "^6.26.0"
|
||||
loader-utils "^0.2.16"
|
||||
|
||||
gatsby-plugin-sharp@^1.6.44:
|
||||
version "1.6.44"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.44.tgz#397e53e2962e5e1dc870408610aad7d6d2d64cb8"
|
||||
gatsby-plugin-sharp@^1.6.47:
|
||||
version "1.6.47"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.47.tgz#bcad9de7f5f269d2415266583c0c3cf48611e165"
|
||||
dependencies:
|
||||
async "^2.1.2"
|
||||
babel-runtime "^6.26.0"
|
||||
@ -4641,9 +4657,9 @@ gatsby-remark-autolink-headers@^1.4.18:
|
||||
mdast-util-to-string "^1.0.2"
|
||||
unist-util-visit "^1.1.1"
|
||||
|
||||
gatsby-remark-copy-linked-files@^1.5.32:
|
||||
version "1.5.32"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-remark-copy-linked-files/-/gatsby-remark-copy-linked-files-1.5.32.tgz#cc54437710d5c3c153c2f681adcd487f468abfd1"
|
||||
gatsby-remark-copy-linked-files@^1.5.35:
|
||||
version "1.5.35"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-remark-copy-linked-files/-/gatsby-remark-copy-linked-files-1.5.35.tgz#398cad86328309a57077e7a3e8c95d951756ab80"
|
||||
dependencies:
|
||||
babel-runtime "^6.26.0"
|
||||
cheerio "^1.0.0-rc.2"
|
||||
@ -4654,13 +4670,13 @@ gatsby-remark-copy-linked-files@^1.5.32:
|
||||
probe-image-size "^4.0.0"
|
||||
unist-util-visit "^1.1.1"
|
||||
|
||||
gatsby-remark-images@^1.5.63:
|
||||
version "1.5.63"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.63.tgz#0ddfd3bcd3386129749024d6ddb88178b87422f2"
|
||||
gatsby-remark-images@^1.5.66:
|
||||
version "1.5.66"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.66.tgz#f852bca527676079cf679e0cd8b9299d9942acce"
|
||||
dependencies:
|
||||
babel-runtime "^6.26.0"
|
||||
cheerio "^1.0.0-rc.2"
|
||||
gatsby-plugin-sharp "^1.6.44"
|
||||
gatsby-plugin-sharp "^1.6.47"
|
||||
is-relative-url "^2.0.0"
|
||||
lodash "^4.17.4"
|
||||
slash "^1.0.0"
|
||||
@ -4675,9 +4691,9 @@ gatsby-remark-smartypants@^1.4.12:
|
||||
retext-smartypants "^2.0.0"
|
||||
unist-util-visit "^1.1.1"
|
||||
|
||||
gatsby-source-filesystem@^1.5.36:
|
||||
version "1.5.36"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.36.tgz#273a9940eacdff3bea6d58f114d8478e7ae3a0de"
|
||||
gatsby-source-filesystem@^1.5.38:
|
||||
version "1.5.38"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.38.tgz#9bf74c7bab280f552b074c72aff99f7bca45f927"
|
||||
dependencies:
|
||||
babel-cli "^6.26.0"
|
||||
babel-runtime "^6.26.0"
|
||||
@ -4692,9 +4708,9 @@ gatsby-source-filesystem@^1.5.36:
|
||||
slash "^1.0.0"
|
||||
valid-url "^1.0.9"
|
||||
|
||||
gatsby-transformer-remark@^1.7.41:
|
||||
version "1.7.41"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-1.7.41.tgz#bfde292a065d306c24e5d303ec28ea24786f096e"
|
||||
gatsby-transformer-remark@^1.7.42:
|
||||
version "1.7.42"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-1.7.42.tgz#c7446dd1d1d98a799e1019476ea05fa170c6afe7"
|
||||
dependencies:
|
||||
babel-runtime "^6.26.0"
|
||||
bluebird "^3.5.0"
|
||||
@ -4717,9 +4733,9 @@ gatsby-transformer-remark@^1.7.41:
|
||||
unist-util-select "^1.5.0"
|
||||
unist-util-visit "^1.1.1"
|
||||
|
||||
gatsby@^1.9.261:
|
||||
version "1.9.261"
|
||||
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.261.tgz#ca5352874de3ec359150d1ce592e19ed564d0fc0"
|
||||
gatsby@^1.9.270:
|
||||
version "1.9.270"
|
||||
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.270.tgz#9a0635c588618dbc11a34bb530c4390c26ef840f"
|
||||
dependencies:
|
||||
async "^2.1.2"
|
||||
babel-code-frame "^6.22.0"
|
||||
@ -4761,7 +4777,7 @@ gatsby@^1.9.261:
|
||||
fs-extra "^4.0.1"
|
||||
gatsby-1-config-css-modules "^1.0.11"
|
||||
gatsby-1-config-extract-plugin "^1.0.3"
|
||||
gatsby-cli "^1.1.52"
|
||||
gatsby-cli "^1.1.58"
|
||||
gatsby-link "^1.6.44"
|
||||
gatsby-module-loader "^1.0.11"
|
||||
gatsby-react-router-scroll "^1.0.17"
|
||||
@ -4890,14 +4906,14 @@ getpass@^0.1.1:
|
||||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
gh-pages@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-1.1.0.tgz#738134d8e35e5323b39892cda28b8904e85f24b2"
|
||||
gh-pages@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-1.2.0.tgz#1acb92801078f7c038a167f447221d1496ccfbee"
|
||||
dependencies:
|
||||
async "2.6.0"
|
||||
base64url "^2.0.0"
|
||||
commander "2.11.0"
|
||||
fs-extra "^4.0.2"
|
||||
async "2.6.1"
|
||||
commander "2.15.1"
|
||||
filenamify-url "^1.0.0"
|
||||
fs-extra "^5.0.0"
|
||||
globby "^6.1.0"
|
||||
graceful-fs "4.1.11"
|
||||
rimraf "^2.6.2"
|
||||
@ -5494,6 +5510,10 @@ hoist-non-react-statics@^2.3.0:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"
|
||||
|
||||
hoist-non-react-statics@^2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
|
||||
|
||||
home-or-tmp@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
|
||||
@ -5634,6 +5654,13 @@ https-browserify@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
|
||||
|
||||
humanize-url@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/humanize-url/-/humanize-url-1.0.1.tgz#f4ab99e0d288174ca4e1e50407c55fbae464efff"
|
||||
dependencies:
|
||||
normalize-url "^1.0.0"
|
||||
strip-url-auth "^1.0.0"
|
||||
|
||||
hyphenate-style-name@^1.0.1, hyphenate-style-name@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b"
|
||||
@ -5789,6 +5816,12 @@ invariant@^2.2.0, invariant@^2.2.1, invariant@^2.2.2:
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
invariant@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
invert-kv@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
|
||||
@ -7545,7 +7578,7 @@ normalize-range@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
|
||||
|
||||
normalize-url@^1.4.0:
|
||||
normalize-url@^1.0.0, normalize-url@^1.4.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
|
||||
dependencies:
|
||||
@ -9200,6 +9233,18 @@ react-router@^4.1.1, react-router@^4.2.0:
|
||||
prop-types "^15.5.4"
|
||||
warning "^3.0.0"
|
||||
|
||||
react-router@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e"
|
||||
dependencies:
|
||||
history "^4.7.2"
|
||||
hoist-non-react-statics "^2.5.0"
|
||||
invariant "^2.2.4"
|
||||
loose-envify "^1.3.1"
|
||||
path-to-regexp "^1.7.0"
|
||||
prop-types "^15.6.1"
|
||||
warning "^4.0.1"
|
||||
|
||||
react-side-effect@^1.0.2, react-side-effect@^1.1.0:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.3.tgz#512c25abe0dec172834c4001ec5c51e04d41bc5c"
|
||||
@ -10861,6 +10906,10 @@ strip-outer@^1.0.0:
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
strip-url-auth@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-url-auth/-/strip-url-auth-1.0.1.tgz#22b0fa3a41385b33be3f331551bbb837fa0cd7ae"
|
||||
|
||||
style-loader@^0.13.0:
|
||||
version "0.13.2"
|
||||
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb"
|
||||
@ -11771,6 +11820,12 @@ warning@^3.0.0:
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
warning@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.1.tgz#66ce376b7fbfe8a887c22bdf0e7349d73d397745"
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
watch@~0.10.0:
|
||||
version "0.10.0"
|
||||
resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc"
|
||||
|
@ -1,60 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"project": {
|
||||
"name": "ng5test"
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"favicon.ico"
|
||||
],
|
||||
"index": "index.html",
|
||||
"main": "main.ts",
|
||||
"polyfills": "polyfills.ts",
|
||||
"test": "test.ts",
|
||||
"tsconfig": "tsconfig.app.json",
|
||||
"testTsconfig": "tsconfig.spec.json",
|
||||
"prefix": "app",
|
||||
"styles": [
|
||||
"styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
"dev": "environments/environment.ts",
|
||||
"prod": "environments/environment.prod.ts"
|
||||
}
|
||||
}
|
||||
],
|
||||
"e2e": {
|
||||
"protractor": {
|
||||
"config": "./protractor.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": [
|
||||
{
|
||||
"project": "src/tsconfig.app.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
},
|
||||
{
|
||||
"project": "src/tsconfig.spec.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
},
|
||||
{
|
||||
"project": "e2e/tsconfig.e2e.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"karma": {
|
||||
"config": "./karma.conf.js"
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
"styleExt": "css",
|
||||
"component": {}
|
||||
}
|
||||
}
|
9
examples/angular-cli/.gitignore
vendored
9
examples/angular-cli/.gitignore
vendored
@ -30,17 +30,10 @@
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
yarn-error.log
|
||||
|
||||
# e2e
|
||||
/e2e/*.js
|
||||
/e2e/*.map
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
/jest_0
|
||||
.jest-test-results.json
|
@ -1,6 +1,6 @@
|
||||
# Ng5test
|
||||
# AngularCli
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.3.0.
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
|
||||
|
||||
## Development server
|
||||
|
||||
@ -12,7 +12,7 @@ Run `ng generate component component-name` to generate a new component. You can
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
@ -21,7 +21,6 @@ Run `ng test` to execute the unit tests via [Jest](https://facebook.github.io/je
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
Before running the tests make sure you are serving the app via `ng serve`.
|
||||
|
||||
## Further help
|
||||
|
||||
|
122
examples/angular-cli/angular.json
Normal file
122
examples/angular-cli/angular.json
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"angular-cli": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"prefix": "app",
|
||||
"schematics": {},
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/angular-cli",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "angular-cli:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "angular-cli:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "angular-cli:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"styles": [
|
||||
"styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"angular-cli-e2e": {
|
||||
"root": "e2e/",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "angular-cli:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": "e2e/tsconfig.e2e.json",
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular-cli"
|
||||
}
|
@ -38,36 +38,38 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "^5.2.11",
|
||||
"@angular/compiler": "^5.2.11",
|
||||
"@angular/core": "^5.2.11",
|
||||
"@angular/forms": "^5.2.11",
|
||||
"@angular/platform-browser": "^5.2.11",
|
||||
"@angular/platform-browser-dynamic": "^5.2.11",
|
||||
"@ngrx/store": "^5.2.0",
|
||||
"@angular/common": "^6.0.3",
|
||||
"@angular/compiler": "^6.0.3",
|
||||
"@angular/core": "^6.0.3",
|
||||
"@angular/forms": "^6.0.3",
|
||||
"@angular/platform-browser": "^6.0.3",
|
||||
"@angular/platform-browser-dynamic": "^6.0.3",
|
||||
"@ngrx/store": "^6.0.1",
|
||||
"core-js": "^2.5.7",
|
||||
"rxjs": "^5.5.11",
|
||||
"rxjs": "^6.2.0",
|
||||
"rxjs-compat": "^6.2.0",
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "1.7.4",
|
||||
"@angular/compiler-cli": "^5.2.11",
|
||||
"@angular-devkit/build-angular": "^0.6.0",
|
||||
"@angular/cli": "^6.0.7",
|
||||
"@angular/compiler-cli": "^6.0.3",
|
||||
"@storybook/addon-actions": "4.0.0-alpha.8",
|
||||
"@storybook/addon-backgrounds": "4.0.0-alpha.8",
|
||||
"@storybook/addon-centered": "4.0.0-alpha.8",
|
||||
"@storybook/addon-jest": "4.0.0-alpha.8",
|
||||
"@storybook/addon-knobs": "4.0.0-alpha.8",
|
||||
"@storybook/addon-links": "4.0.0-alpha.8",
|
||||
"@storybook/addon-notes": "4.0.0-alpha.8",
|
||||
"@storybook/addon-options": "4.0.0-alpha.8",
|
||||
"@storybook/addon-centered": "4.0.0-alpha.8",
|
||||
"@storybook/addon-storyshots": "4.0.0-alpha.8",
|
||||
"@storybook/addon-storysource": "4.0.0-alpha.8",
|
||||
"@storybook/addons": "4.0.0-alpha.8",
|
||||
"@storybook/angular": "4.0.0-alpha.8",
|
||||
"@types/jasmine": "~2.8.7",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "^2.0.3",
|
||||
"@types/jest": "^22.2.3",
|
||||
"@types/node": "~9.6.18",
|
||||
"@types/node": "~9.6.20",
|
||||
"babel-core": "^6.26.3",
|
||||
"global": "^4.3.2",
|
||||
"jasmine-core": "~3.1.0",
|
||||
@ -75,7 +77,7 @@
|
||||
"jest": "^22.4.4",
|
||||
"jest-preset-angular": "^5.2.2",
|
||||
"protractor": "~5.3.2",
|
||||
"ts-node": "~6.0.5",
|
||||
"typescript": "^2.8.3"
|
||||
"ts-node": "~6.1.0",
|
||||
"typescript": "^2.9.1"
|
||||
}
|
||||
}
|
||||
|
@ -9,15 +9,11 @@ exports[`Storyshots Addon|Actions Action and method 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c4=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c4=""
|
||||
>
|
||||
Action and Method
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -31,15 +27,11 @@ exports[`Storyshots Addon|Actions Action only 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c3=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c3=""
|
||||
>
|
||||
Action only
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,50 +7,29 @@ exports[`Storyshots Addon|Background background component 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-app-root>
|
||||
|
||||
|
||||
<div
|
||||
class="hide"
|
||||
style="color: red; font-size: 30px; text-align: center;"
|
||||
>
|
||||
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
style="text-align:center"
|
||||
>
|
||||
|
||||
|
||||
<h1>
|
||||
|
||||
Welcome to app!
|
||||
|
||||
Welcome to app!
|
||||
</h1>
|
||||
|
||||
|
||||
<img
|
||||
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
|
||||
width="300"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>
|
||||
Here are some links to help you start:
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://angular.io/tutorial"
|
||||
@ -59,14 +38,8 @@ exports[`Storyshots Addon|Background background component 1`] = `
|
||||
Tour of Heroes
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://github.com/angular/angular-cli/wiki"
|
||||
@ -75,14 +48,8 @@ exports[`Storyshots Addon|Background background component 1`] = `
|
||||
CLI Documentation
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://blog.angular.io//"
|
||||
@ -91,15 +58,8 @@ exports[`Storyshots Addon|Background background component 1`] = `
|
||||
Angular blog
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</storybook-app-root>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -115,15 +75,11 @@ exports[`Storyshots Addon|Background background template 1`] = `
|
||||
_nghost-c5=""
|
||||
ng-reflect-text="Hello Button"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c5=""
|
||||
>
|
||||
Hello Button
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -7,65 +7,38 @@ exports[`Storyshots Addon|Centered centered component 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<ng-component>
|
||||
|
||||
|
||||
<div
|
||||
ng-reflect-ng-style="[object Object]"
|
||||
style="position: fixed; top: 0px; left: 0px; bottom: 0px; right: 0px; display: flex; overflow: auto;"
|
||||
>
|
||||
|
||||
|
||||
<div
|
||||
ng-reflect-ng-style="[object Object]"
|
||||
style="margin: auto;"
|
||||
>
|
||||
|
||||
|
||||
<storybook-app-root>
|
||||
|
||||
|
||||
<div
|
||||
class="hide"
|
||||
style="color: red; font-size: 30px; text-align: center;"
|
||||
>
|
||||
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
style="text-align:center"
|
||||
>
|
||||
|
||||
|
||||
<h1>
|
||||
|
||||
Welcome to app!
|
||||
|
||||
Welcome to app!
|
||||
</h1>
|
||||
|
||||
|
||||
<img
|
||||
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
|
||||
width="300"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>
|
||||
Here are some links to help you start:
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://angular.io/tutorial"
|
||||
@ -74,14 +47,8 @@ exports[`Storyshots Addon|Centered centered component 1`] = `
|
||||
Tour of Heroes
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://github.com/angular/angular-cli/wiki"
|
||||
@ -90,14 +57,8 @@ exports[`Storyshots Addon|Centered centered component 1`] = `
|
||||
CLI Documentation
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://blog.angular.io//"
|
||||
@ -106,21 +67,10 @@ exports[`Storyshots Addon|Centered centered component 1`] = `
|
||||
Angular blog
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</storybook-app-root>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -133,39 +83,25 @@ exports[`Storyshots Addon|Centered centered template 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<ng-component>
|
||||
|
||||
|
||||
<div
|
||||
ng-reflect-ng-style="[object Object]"
|
||||
style="position: fixed; top: 0px; left: 0px; bottom: 0px; right: 0px; display: flex; overflow: auto;"
|
||||
>
|
||||
|
||||
|
||||
<div
|
||||
ng-reflect-ng-style="[object Object]"
|
||||
style="margin: auto;"
|
||||
>
|
||||
|
||||
|
||||
<storybook-button-component
|
||||
_nghost-c6=""
|
||||
ng-reflect-text="Hello Button"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c6=""
|
||||
>
|
||||
Hello Button
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -7,50 +7,29 @@ exports[`Storyshots Addon|Jest app.component with jest tests 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-app-root>
|
||||
|
||||
|
||||
<div
|
||||
class="hide"
|
||||
style="color: red; font-size: 30px; text-align: center;"
|
||||
>
|
||||
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
style="text-align:center"
|
||||
>
|
||||
|
||||
|
||||
<h1>
|
||||
|
||||
Welcome to app!
|
||||
|
||||
Welcome to app!
|
||||
</h1>
|
||||
|
||||
|
||||
<img
|
||||
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
|
||||
width="300"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>
|
||||
Here are some links to help you start:
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://angular.io/tutorial"
|
||||
@ -59,14 +38,8 @@ exports[`Storyshots Addon|Jest app.component with jest tests 1`] = `
|
||||
Tour of Heroes
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://github.com/angular/angular-cli/wiki"
|
||||
@ -75,14 +48,8 @@ exports[`Storyshots Addon|Jest app.component with jest tests 1`] = `
|
||||
CLI Documentation
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://blog.angular.io//"
|
||||
@ -91,15 +58,8 @@ exports[`Storyshots Addon|Jest app.component with jest tests 1`] = `
|
||||
Angular blog
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</storybook-app-root>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,79 +7,46 @@ exports[`Storyshots Addon|Knobs All knobs 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-simple-knobs-component>
|
||||
|
||||
|
||||
<div
|
||||
ng-reflect-ng-style="[object Object]"
|
||||
style="border-radius: 8px;"
|
||||
>
|
||||
|
||||
|
||||
<h1>
|
||||
My name is Jane,
|
||||
</h1>
|
||||
|
||||
|
||||
<h3>
|
||||
today is Jan 20, 2017
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
I have a stock of 20 apples, costing $ 2.25 each.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
Sorry.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
Also, I have:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Laptop
|
||||
|
||||
Laptop
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Book
|
||||
|
||||
Book
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Whiskey
|
||||
|
||||
Whiskey
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
Nice to meet you!
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</storybook-simple-knobs-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -91,32 +58,20 @@ exports[`Storyshots Addon|Knobs Simple 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<ng-component>
|
||||
|
||||
|
||||
<h1>
|
||||
This is a template
|
||||
</h1>
|
||||
|
||||
|
||||
<storybook-simple-knobs-component
|
||||
ng-reflect-name="John Doe"
|
||||
ng-reflect-phone-number="555-55-55"
|
||||
>
|
||||
|
||||
|
||||
<div>
|
||||
I am John Doe and I'm years old.
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
Phone Number: 555-55-55
|
||||
</div>
|
||||
|
||||
|
||||
</storybook-simple-knobs-component>
|
||||
|
||||
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -9,15 +9,11 @@ exports[`Storyshots Addon|Links button with link to another story 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c7=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c7=""
|
||||
>
|
||||
Go to Welcome Story
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -9,15 +9,11 @@ exports[`Storyshots Addon|Notes Note with HTML 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c9=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c9=""
|
||||
>
|
||||
Notes with HTML
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -31,15 +27,11 @@ exports[`Storyshots Addon|Notes Simple note 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c8=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c8=""
|
||||
>
|
||||
Notes on some Button
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,50 +7,29 @@ exports[`Storyshots App Component Component with separate template 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-app-root>
|
||||
|
||||
|
||||
<div
|
||||
class="hide"
|
||||
style="color: red; font-size: 30px; text-align: center;"
|
||||
>
|
||||
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
This should be hidden, if not - scss is not loaded as needed.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
style="text-align:center"
|
||||
>
|
||||
|
||||
|
||||
<h1>
|
||||
|
||||
Welcome to app!
|
||||
|
||||
Welcome to app!
|
||||
</h1>
|
||||
|
||||
|
||||
<img
|
||||
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
|
||||
width="300"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>
|
||||
Here are some links to help you start:
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://angular.io/tutorial"
|
||||
@ -59,14 +38,8 @@ exports[`Storyshots App Component Component with separate template 1`] = `
|
||||
Tour of Heroes
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://github.com/angular/angular-cli/wiki"
|
||||
@ -75,14 +48,8 @@ exports[`Storyshots App Component Component with separate template 1`] = `
|
||||
CLI Documentation
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<h2>
|
||||
<a
|
||||
href="https://blog.angular.io//"
|
||||
@ -91,15 +58,8 @@ exports[`Storyshots App Component Component with separate template 1`] = `
|
||||
Angular blog
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</storybook-app-root>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -9,15 +9,11 @@ exports[`Storyshots Core|Parameters passed to story 1`] = `
|
||||
<storybook-button-component
|
||||
_nghost-c10=""
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c10=""
|
||||
>
|
||||
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,22 +7,12 @@ exports[`Storyshots Custom|Providers Simple 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-simple-service-component>
|
||||
|
||||
|
||||
<p>
|
||||
Static name:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-service-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -34,22 +24,12 @@ exports[`Storyshots Custom|Providers With knobs 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-simple-service-component>
|
||||
|
||||
|
||||
<p>
|
||||
Dynamic knob:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-service-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -11,15 +11,11 @@ exports[`Storyshots Custom|Style Default 1`] = `
|
||||
_nghost-c11=""
|
||||
ng-reflect-text="Button with custom styles"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c11=""
|
||||
>
|
||||
Button with custom styles
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -36,15 +32,11 @@ exports[`Storyshots Custom|Style With Knobs 1`] = `
|
||||
_nghost-c12=""
|
||||
ng-reflect-text="Button with custom styles"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c12=""
|
||||
>
|
||||
Button with custom styles
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -11,15 +11,11 @@ exports[`Storyshots Button with some emoji 1`] = `
|
||||
_nghost-c2=""
|
||||
ng-reflect-text="😀 😎 👍 💯"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c2=""
|
||||
>
|
||||
😀 😎 👍 💯
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -36,15 +32,11 @@ exports[`Storyshots Button with text 1`] = `
|
||||
_nghost-c1=""
|
||||
ng-reflect-text="Hello Button"
|
||||
>
|
||||
|
||||
|
||||
<button
|
||||
_ngcontent-c1=""
|
||||
>
|
||||
Hello Button
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-button-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -60,61 +52,43 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
<storybook-welcome-component
|
||||
_nghost-c0=""
|
||||
>
|
||||
|
||||
|
||||
<main
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
|
||||
|
||||
<h1
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
Welcome to storybook
|
||||
</h1>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
This is a UI component dev environment for your app.
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
|
||||
We've added some basic stories inside the
|
||||
We've added some basic stories inside the
|
||||
<span
|
||||
_ngcontent-c0=""
|
||||
class="inline-code"
|
||||
>
|
||||
src/stories
|
||||
</span>
|
||||
directory.
|
||||
|
||||
directory.
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
A story is a single state of one or more UI components. You can have as many stories as
|
||||
you want.
|
||||
|
||||
A story is a single state of one or more UI components. You can have as many stories as you want.
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
(Basically a story is like a visual test case.)
|
||||
|
||||
(Basically a story is like a visual test case.)
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
|
||||
See these sample
|
||||
See these sample
|
||||
<a
|
||||
_ngcontent-c0=""
|
||||
role="button"
|
||||
@ -122,113 +96,82 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
stories
|
||||
</a>
|
||||
for a component called
|
||||
|
||||
for a component called
|
||||
<span
|
||||
_ngcontent-c0=""
|
||||
class="inline-code"
|
||||
>
|
||||
Button
|
||||
</span>
|
||||
.
|
||||
|
||||
.
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
|
||||
Just like that, you can add your own components as stories.
|
||||
|
||||
Just like that, you can add your own components as stories.
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
You can also edit those components and see changes right away.
|
||||
|
||||
You can also edit those components and see changes right away.
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
(Try editing the
|
||||
(Try editing the
|
||||
<span
|
||||
_ngcontent-c0=""
|
||||
class="inline-code"
|
||||
>
|
||||
Button
|
||||
</span>
|
||||
stories
|
||||
located at
|
||||
stories located at
|
||||
<span
|
||||
_ngcontent-c0=""
|
||||
class="inline-code"
|
||||
>
|
||||
src/stories/index.js
|
||||
</span>
|
||||
.)
|
||||
|
||||
.)
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
Have a look at the
|
||||
Have a look at the
|
||||
<a
|
||||
_ngcontent-c0=""
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
|
||||
Writing Stories
|
||||
|
||||
Writing Stories
|
||||
</a>
|
||||
section in our documentation.
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
_ngcontent-c0=""
|
||||
class="note"
|
||||
>
|
||||
|
||||
|
||||
<b
|
||||
_ngcontent-c0=""
|
||||
>
|
||||
NOTE:
|
||||
</b>
|
||||
|
||||
|
||||
<br
|
||||
_ngcontent-c0=""
|
||||
/>
|
||||
|
||||
Have a look at the
|
||||
Have a look at the
|
||||
<span
|
||||
_ngcontent-c0=""
|
||||
class="inline-code"
|
||||
>
|
||||
.storybook/webpack.config.js
|
||||
</span>
|
||||
|
||||
to add webpack loaders and plugins you are using in this project.
|
||||
|
||||
to add webpack loaders and plugins you are using in this project.
|
||||
</p>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
</storybook-welcome-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -10,37 +10,21 @@ exports[`Storyshots Metadata|Combined Combined 1 1`] = `
|
||||
<storybook-simple-token-component
|
||||
ng-reflect-name="Prop Name"
|
||||
>
|
||||
|
||||
|
||||
<h3>
|
||||
Prop Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Joe
|
||||
|
||||
Joe
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jane
|
||||
|
||||
Jane
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -56,37 +40,21 @@ exports[`Storyshots Metadata|Combined Combined 2 1`] = `
|
||||
<storybook-simple-token-component
|
||||
ng-reflect-name="CustomPipe: Prop Name"
|
||||
>
|
||||
|
||||
|
||||
<h3>
|
||||
CustomPipe: Prop Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Joe
|
||||
|
||||
Joe
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jane
|
||||
|
||||
Jane
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -10,37 +10,21 @@ exports[`Storyshots Metadata|Individual Individual 1 1`] = `
|
||||
<storybook-simple-token-component
|
||||
ng-reflect-name="Prop Name"
|
||||
>
|
||||
|
||||
|
||||
<h3>
|
||||
Prop Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Joe
|
||||
|
||||
Joe
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jane
|
||||
|
||||
Jane
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -54,37 +38,21 @@ exports[`Storyshots Metadata|Individual Individual 2 1`] = `
|
||||
>
|
||||
<ng-component>
|
||||
<storybook-simple-token-component>
|
||||
|
||||
|
||||
<h3>
|
||||
Provider Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Jim
|
||||
|
||||
Jim
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jill
|
||||
|
||||
Jill
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -10,37 +10,21 @@ exports[`Storyshots Metadata|Shared Shared 1 1`] = `
|
||||
<storybook-simple-token-component
|
||||
ng-reflect-name="Prop Name"
|
||||
>
|
||||
|
||||
|
||||
<h3>
|
||||
Prop Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Joe
|
||||
|
||||
Joe
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jane
|
||||
|
||||
Jane
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
@ -54,37 +38,21 @@ exports[`Storyshots Metadata|Shared Shared 2 1`] = `
|
||||
>
|
||||
<ng-component>
|
||||
<storybook-simple-token-component>
|
||||
|
||||
|
||||
<h3>
|
||||
Provider Name
|
||||
</h3>
|
||||
|
||||
|
||||
<p>
|
||||
Items:
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
Joe
|
||||
|
||||
Joe
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Jane
|
||||
|
||||
Jane
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</storybook-simple-token-component>
|
||||
</ng-component>
|
||||
</storybook-dynamic-app-root>
|
||||
|
@ -8,39 +8,25 @@ exports[`Storyshots Custom|Dependencies inputs and inject dependencies 1`] = `
|
||||
>
|
||||
<storybook-di-component>
|
||||
<div>
|
||||
|
||||
|
||||
<div>
|
||||
All dependencies are defined: true
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
Title: Component dependencies
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
Injector: function Injector_(view, elDef) {
|
||||
this.view = view;
|
||||
this.elDef = elDef;
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
ElementRef: {"nativeElement":{}}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
TestToken: 123
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</storybook-di-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -53,39 +39,25 @@ exports[`Storyshots Custom|Dependencies inputs and inject dependencies with knob
|
||||
>
|
||||
<storybook-di-component>
|
||||
<div>
|
||||
|
||||
|
||||
<div>
|
||||
All dependencies are defined: true
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
Title: Component dependencies
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
Injector: function Injector_(view, elDef) {
|
||||
this.view = view;
|
||||
this.elDef = elDef;
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
ElementRef: {"nativeElement":{}}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
TestToken: 123
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</storybook-di-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -8,32 +8,22 @@ exports[`Storyshots Custom|styleUrls Component with styles 1`] = `
|
||||
>
|
||||
<storybook-styled-component>
|
||||
<div>
|
||||
|
||||
|
||||
<p
|
||||
class="red-color"
|
||||
>
|
||||
Styled with scoped CSS
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
class="blue-color"
|
||||
>
|
||||
Styled with scoped SCSS
|
||||
</p>
|
||||
|
||||
|
||||
<p
|
||||
class="green-color"
|
||||
>
|
||||
Styled with global CSS
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</storybook-styled-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,20 +7,14 @@ exports[`Storyshots Custom|ngModel custom ControlValueAccessor 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-custom-cva-component>
|
||||
|
||||
|
||||
<div>
|
||||
Type anything
|
||||
</div>
|
||||
|
||||
|
||||
<input
|
||||
class="ng-untouched ng-pristine ng-valid"
|
||||
ng-reflect-model="Type anything"
|
||||
type="text"
|
||||
/>
|
||||
|
||||
|
||||
</storybook-custom-cva-component>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -7,13 +7,9 @@ exports[`Storyshots Custom|Inheritance base button 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-base-button>
|
||||
|
||||
|
||||
<button>
|
||||
this is label
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-base-button>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
@ -25,13 +21,9 @@ exports[`Storyshots Custom|Inheritance icon button 1`] = `
|
||||
target={[Function ViewContainerRef_]}
|
||||
>
|
||||
<storybook-icon-button>
|
||||
|
||||
|
||||
<button>
|
||||
this is label - this is icon
|
||||
</button>
|
||||
|
||||
|
||||
</storybook-icon-button>
|
||||
</storybook-dynamic-app-root>
|
||||
`;
|
||||
|
@ -39,6 +39,6 @@
|
||||
"enzyme-to-json": "^3.3.4",
|
||||
"jest": "^20.0.4",
|
||||
"react-scripts": "^1.1.4",
|
||||
"webpack": "^4.9.2"
|
||||
"webpack": "^4.10.2"
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
"eslint": "^4.2.0",
|
||||
"eslint-config-prettier": "^2.3.0",
|
||||
"eslint-plugin-prettier": "^2.1.2",
|
||||
"prettier": "^1.13.0",
|
||||
"webpack": "^4.9.2"
|
||||
"prettier": "^1.13.4",
|
||||
"webpack": "^4.10.2"
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
"@storybook/mithril": "4.0.0-alpha.8",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-plugin-transform-react-jsx": "^6.24.1",
|
||||
"webpack": "^4.9.2"
|
||||
"webpack": "^4.10.2"
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,6 @@
|
||||
"react-dom": "^16.4.0",
|
||||
"react-emotion": "^9.1.3",
|
||||
"uuid": "^3.2.1",
|
||||
"webpack": "^4.9.2"
|
||||
"webpack": "^4.10.2"
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
"global": "^4.3.2",
|
||||
"lit-html": "^0.10.0",
|
||||
"polymer-webpack-loader": "^2.0.2",
|
||||
"webpack": "^4.9.2"
|
||||
"webpack": "^4.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.3",
|
||||
|
@ -33,7 +33,7 @@
|
||||
"file-loader": "^1.1.11",
|
||||
"svg-url-loader": "^2.3.2",
|
||||
"vue-loader": "^14.2.3",
|
||||
"webpack": "^4.9.2",
|
||||
"webpack": "^4.10.2",
|
||||
"webpack-dev-server": "^3.1.4"
|
||||
}
|
||||
}
|
||||
|
@ -23,11 +23,11 @@
|
||||
"@storybook/node-logger": "4.0.0-alpha.8",
|
||||
"@storybook/react-dev-utils": "^5.0.0",
|
||||
"@storybook/ui": "4.0.0-alpha.8",
|
||||
"airbnb-js-shims": "^1.5.2",
|
||||
"autoprefixer": "^8.5.1",
|
||||
"airbnb-js-shims": "^1.6.0",
|
||||
"autoprefixer": "^8.6.0",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-plugin-macros": "^2.2.1",
|
||||
"babel-plugin-macros": "^2.2.2",
|
||||
"babel-plugin-transform-regenerator": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
@ -39,7 +39,7 @@
|
||||
"core-js": "^2.5.7",
|
||||
"css-loader": "^0.28.11",
|
||||
"dotenv": "^5.0.1",
|
||||
"dotenv-webpack": "^1.5.5",
|
||||
"dotenv-webpack": "^1.5.6",
|
||||
"emotion": "^9.1.3",
|
||||
"express": "^4.16.3",
|
||||
"file-loader": "^1.1.11",
|
||||
@ -59,7 +59,7 @@
|
||||
"style-loader": "^0.21.0",
|
||||
"svg-url-loader": "^2.3.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.9.2",
|
||||
"webpack": "^4.10.2",
|
||||
"webpack-dev-middleware": "^3.1.3",
|
||||
"webpack-hot-middleware": "^2.22.2"
|
||||
},
|
||||
|
@ -37,7 +37,7 @@
|
||||
"react-fuzzy": "^0.5.2",
|
||||
"react-icons": "^2.2.7",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"react-modal": "^3.4.4",
|
||||
"react-modal": "^3.4.5",
|
||||
"react-treebeard": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
30
package.json
30
package.json
@ -39,17 +39,17 @@
|
||||
"chromatic": "npm --prefix examples/official-storybook run chromatic"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^5.2.11",
|
||||
"@angular/compiler": "^5.2.11",
|
||||
"@angular/core": "^5.2.11",
|
||||
"@angular/forms": "^5.2.11",
|
||||
"@angular/platform-browser": "^5.2.11",
|
||||
"@angular/platform-browser-dynamic": "^5.2.11",
|
||||
"@angular/common": "^6.0.3",
|
||||
"@angular/compiler": "^6.0.3",
|
||||
"@angular/core": "^6.0.3",
|
||||
"@angular/forms": "^6.0.3",
|
||||
"@angular/platform-browser": "^6.0.3",
|
||||
"@angular/platform-browser-dynamic": "^6.0.3",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-plugin-emotion": "^9.1.2",
|
||||
"babel-plugin-macros": "^2.2.1",
|
||||
"babel-plugin-macros": "^2.2.2",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
@ -60,7 +60,7 @@
|
||||
"commander": "^2.15.1",
|
||||
"concurrently": "^3.5.1",
|
||||
"cross-env": "^5.1.6",
|
||||
"danger": "^3.7.14",
|
||||
"danger": "^3.7.15",
|
||||
"emotion": "^9.1.3",
|
||||
"emotion-theming": "^9.1.2",
|
||||
"enzyme": "^3.3.0",
|
||||
@ -73,8 +73,8 @@
|
||||
"eslint-plugin-json": "^1.2.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
||||
"eslint-plugin-prettier": "^2.6.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-teamcity": "^2.0.0",
|
||||
"eslint-plugin-react": "^7.9.1",
|
||||
"eslint-teamcity": "^2.0.1",
|
||||
"github-release-from-changelog": "^1.3.1",
|
||||
"glob": "^7.1.2",
|
||||
"husky": "^0.14.3",
|
||||
@ -93,23 +93,23 @@
|
||||
"jest-teamcity-reporter": "^0.9.0",
|
||||
"jest-vue-preprocessor": "^1.4.0",
|
||||
"lerna": "2.11.0",
|
||||
"lint-staged": "^7.1.2",
|
||||
"lint-staged": "^7.1.3",
|
||||
"lodash": "^4.17.10",
|
||||
"npmlog": "^4.1.2",
|
||||
"polymer-webpack-loader": "^2.0.2",
|
||||
"prettier": "^1.13.0",
|
||||
"prettier": "^1.13.4",
|
||||
"raf": "^3.4.0",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0",
|
||||
"react-test-renderer": "^16.4.0",
|
||||
"remark-cli": "^5.0.0",
|
||||
"remark-lint": "^6.0.1",
|
||||
"remark-preset-lint-recommended": "^3.0.1",
|
||||
"remark-lint": "^6.0.2",
|
||||
"remark-preset-lint-recommended": "^3.0.2",
|
||||
"shelljs": "^0.8.2",
|
||||
"tslint": "~5.10.0",
|
||||
"tslint-config-prettier": "^1.13.0",
|
||||
"tslint-plugin-prettier": "^1.3.0",
|
||||
"typescript": "^2.8.3"
|
||||
"typescript": "^2.9.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user