docs(style-guide): repair missing JSON examples

This commit is contained in:
Ward Bell 2016-01-08 15:44:43 -08:00
parent 8e59fb41ce
commit 59b55794a7
2 changed files with 33 additions and 8 deletions

View File

@ -0,0 +1,25 @@
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.0",
"systemjs": "0.19.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.10"
},
"devDependencies": {
"concurrently": "^1.0.0",
"lite-server": "^1.3.1",
"typescript": "^1.7.3"
}
}

View File

@ -270,36 +270,36 @@ include ../../../_includes/_util-fns
#### Example: #### Example:
code-example(format="linenums" language="js"). code-example(format="" language="js").
+makeJson('styleguide/package.json', null, "Entire package.json file") +makeJson('styleguide/package.json', null, "Entire package.json file")
+makeJson('styleguide/package.json', null, "Entire package.json file") +makeJson('styleguide/package.1.json', null, "Entire package.json file")
:marked :marked
A subset of the '.json' file can also be selected. A subset of the '.json' file can also be selected.
code-example(format="linenums" language="js"). code-example(format="" language="js").
+makeJson('styleguide/package.json', { paths: 'version, scripts.tsc, scripts.start '}, "Selected parts of the package.json file" ) +makeJson('styleguide/package.json', { paths: 'version, scripts.tsc, scripts.start '}, "Selected parts of the package.json file" )
+makeJson('styleguide/package.json', { paths: 'version, scripts.tsc, scripts.start '}, "Selected parts of the package.json file" ) +makeJson('styleguide/package.1.json', { paths: 'version, scripts.tsc, scripts.start '}, "Selected parts of the package.json file" )
:marked :marked
Styling selected portions of the json is also supported. Styling selected portions of the json is also supported.
code-example(format="linenums" language="js"). code-example(format="" language="js").
+makeJson('styleguide/package.json', {paths: 'dependencies'}, "package.json dependencies", { pnk: [/(\S*traceur.*)/, /(\Sangular2.*)/, /(\Ssystem.*)/ ]}) +makeJson('styleguide/package.json', {paths: 'dependencies'}, "package.json dependencies", { pnk: [/(\S*traceur.*)/, /(\Sangular2.*)/, /(\Ssystem.*)/ ]})
+makeJson('styleguide/package.json', {paths: 'dependencies'}, "package.json dependencies", { pnk: [/(\S*traceur.*)/, /(\Sangular2.*)/, /(\Ssystem.*)/ ]}) +makeJson('styleguide/package.1.json', {paths: 'dependencies'}, "package.json dependencies", { pnk: [/(\S*traceur.*)/, /(\Sangular2.*)/, /(\Ssystem.*)/ ]})
:marked :marked
As well as styling across multiple lines. As well as styling across multiple lines.
code-example(format="linenums" language="js"). code-example(format="" language="js").
- var styles = { pnk: /(^.*dependencies[\s\S]* \})/gm }; - var styles = { pnk: /(^.*dependencies[\s\S]* \})/gm };
+makeJson('styleguide/package.json', {paths: 'name, version, dependencies '}, "Foo", styles ) +makeJson('styleguide/package.json', {paths: 'name, version, dependencies '}, "Foo", styles )
- var styles = { pnk: /(^.*dependencies[\s\S]* \})/gm }; - var styles = { pnk: /(^.*dependencies[\s\S]* \})/gm };
+makeJson('styleguide/package.json', {paths: 'name, version, dependencies '}, "Foo", styles ) +makeJson('styleguide/package.1.json', {paths: 'name, version, dependencies '}, "Foo", styles )
:marked :marked
### Inline code and code examples provided directly i.e. not from an example file. ### Inline code and code examples provided directly i.e. not from an example file.