Skip to content
Snippets Groups Projects
Commit 88e4f1b2 authored by syuilo's avatar syuilo
Browse files

✌️

parent 727ecf86
No related branches found
No related tags found
No related merge requests found
import * as fs from 'fs';
const license = fs.readFileSync(__dirname + '/../../../LICENSE', 'utf-8');
const licenseHtml = license
.replace(/\r\n/g, '\n')
.replace(/(.)\n(.)/g, '$1 $2')
.replace(/(^|\n)(.*?)($|\n)/g, '<p>$2</p>');
export {
license,
licenseHtml
};
h1 License
div!= common.license
h1 ライセンス
div!= common.license
......@@ -4,6 +4,7 @@ import * as yaml from 'js-yaml';
import { fa } from '../../common/build/fa';
import config from '../../conf';
import { licenseHtml } from '../../common/build/license';
const constants = require('../../const.json');
export default function(): { [key: string]: any } {
......@@ -42,5 +43,7 @@ export default function(): { [key: string]: any } {
vars['facss'] = fa.dom.css();
vars['license'] = licenseHtml;
return vars;
}
......@@ -2,13 +2,8 @@
* Inject license
*/
import * as fs from 'fs';
const StringReplacePlugin = require('string-replace-webpack-plugin');
const license = fs.readFileSync(__dirname + '/../../../LICENSE', 'utf-8')
.replace(/\r\n/g, '\n')
.replace(/(.)\n(.)/g, '$1 $2')
.replace(/(^|\n)(.*?)($|\n)/g, '<p>$2</p>');
import { licenseHtml } from '../../../src/common/build/license';
export default () => ({
enforce: 'pre',
......@@ -16,7 +11,7 @@ export default () => ({
exclude: /node_modules/,
loader: StringReplacePlugin.replace({
replacements: [{
pattern: '%license%', replacement: () => license
pattern: '%license%', replacement: () => licenseHtml
}]
})
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment