diff --git a/docs/api/templates/filters/tojson/index.html b/docs/api/templates/filters/tojson/index.html index 9bf9ea74..f9f5eee8 100644 --- a/docs/api/templates/filters/tojson/index.html +++ b/docs/api/templates/filters/tojson/index.html @@ -195,8 +195,8 @@ supported by JSON directly and the return value will be in a format that allows safe embedding in HTML. However if you want to use this value in an attribute of an element it needs to use single quotes otherwise it will generate a syntax error due to the embedded quotes.
-<script type="text/javascript">
- var options = {{ {'foo': 'bar'}|tojson }};
+Examples
<script type="text/javascript">
+ var options = {{ {'foo': 'bar'}|tojson }};
</script>
If used in attributes, single quotes are required:
diff --git a/docs/guides/webpack/index.html b/docs/guides/webpack/index.html
index b304e2d4..a57a7bd2 100644
--- a/docs/guides/webpack/index.html
+++ b/docs/guides/webpack/index.html
@@ -232,48 +232,48 @@ installed for as long as someone else ran it before.
assets/static/gen
gen/app.js
and a gen/styles.css
file to includevar webpack = require('webpack');
-var path = require('path');
-var ExtractTextPlugin = require('extract-text-webpack-plugin');
+var webpack = require('webpack');
+var path = require('path');
+var ExtractTextPlugin = require('extract-text-webpack-plugin');
-module.exports = {
- entry: {
- 'app': './js/main.js',
- 'styles': './scss/main.scss'
- },
- output: {
- path: path.dirname(__dirname) + '/assets/static/gen',
- filename: '[name].js'
- },
- devtool: '#cheap-module-source-map',
- resolve: {
- modules: ['node_modules'],
- extensions: ['.js']
- },
- module: {
- rules: [
- { test: /\.js$/, exclude: /node_modules/,
- loader: 'babel-loader' },
- { test: /\.scss$/,
- loader: ExtractTextPlugin.extract({
- fallback: 'style-loader',
- use: 'css-loader!sass-loader' } ) },
- { test: /\.css$/,
- loader: ExtractTextPlugin.extract({
- fallback: 'style-loader',
- use: 'css-loader' } ) },
- { test: /\.(woff2?|ttf|eot|svg|png|jpe?g|gif)$/,
- loader: 'file' }
- ]
- },
- plugins: [
- new ExtractTextPlugin({
- filename: 'styles.css',
- allChunks: true
- }),
- new webpack.optimize.UglifyJsPlugin()
- ]
-};
+module.exports = {
+ entry: {
+ 'app': './js/main.js',
+ 'styles': './scss/main.scss'
+ },
+ output: {
+ path: path.dirname(__dirname) + '/assets/static/gen',
+ filename: '[name].js'
+ },
+ devtool: '#cheap-module-source-map',
+ resolve: {
+ modules: ['node_modules'],
+ extensions: ['.js']
+ },
+ module: {
+ rules: [
+ { test: /\.js$/, exclude: /node_modules/,
+ loader: 'babel-loader' },
+ { test: /\.scss$/,
+ loader: ExtractTextPlugin.extract({
+ fallback: 'style-loader',
+ use: 'css-loader!sass-loader' } ) },
+ { test: /\.css$/,
+ loader: ExtractTextPlugin.extract({
+ fallback: 'style-loader',
+ use: 'css-loader' } ) },
+ { test: /\.(woff2?|ttf|eot|svg|png|jpe?g|gif)$/,
+ loader: 'file' }
+ ]
+ },
+ plugins: [
+ new ExtractTextPlugin({
+ filename: 'styles.css',
+ allChunks: true
+ }),
+ new webpack.optimize.UglifyJsPlugin()
+ ]
+};
Creating the App
Now we can start building our app. We configured at least two files
in webpack: js/main.js
and scss/main.scss
. Those are the entry
diff --git a/index.html b/index.html
index 372e399d..116fe3b2 100644
--- a/index.html
+++ b/index.html
@@ -151,7 +151,7 @@ speak multiple languages and allow you to easily create localized websites.