Compare commits

..

4 Commits

Author SHA1 Message Date
Rich Harris
687071902d -> v0.9.5 2018-03-11 21:30:17 -04:00
Rich Harris
cd3fcfdf3c move deps to devDeps 2018-03-11 21:29:34 -04:00
Rich Harris
dad48e4abd Merge pull request #197 from sveltejs/fix-clorox
workaround clorox bug
2018-03-11 21:29:12 -04:00
Rich Harris
37d3d57694 workaround clorox bug 2018-03-11 20:51:14 -04:00
6 changed files with 18 additions and 14 deletions

View File

@@ -1,5 +1,9 @@
# sapper changelog
## 0.9.5
* Stringify clorox output ([#197](https://github.com/sveltejs/sapper/pull/197))
## 0.9.4
* Add `SAPPER_BASE` and `SAPPER_APP` environment variables ([#181](https://github.com/sveltejs/sapper/issues/181))

View File

@@ -1,6 +1,6 @@
{
"name": "sapper",
"version": "0.9.4",
"version": "0.9.5",
"description": "Military-grade apps, engineered by Svelte",
"main": "dist/middleware.ts.js",
"bin": {
@@ -26,7 +26,6 @@
"html-minifier": "^3.5.10",
"mkdirp": "^0.5.1",
"node-fetch": "^1.7.3",
"polka": "^0.3.4",
"port-authority": "^1.0.2",
"pretty-bytes": "^4.0.2",
"pretty-ms": "^3.1.0",
@@ -35,7 +34,6 @@
"sade": "^1.4.0",
"sander": "^0.6.0",
"source-map-support": "^0.5.3",
"tslib": "^1.9.0",
"url-parse": "^1.2.0",
"walk-sync": "^0.3.2",
"webpack-format-messages": "^1.0.1"
@@ -52,6 +50,7 @@
"mocha": "^4.0.1",
"nightmare": "^2.10.0",
"npm-run-all": "^4.1.2",
"polka": "^0.3.4",
"rollup": "^0.56.5",
"rollup-plugin-commonjs": "^8.3.0",
"rollup-plugin-json": "^2.3.0",
@@ -60,6 +59,7 @@
"serve-static": "^1.13.2",
"svelte": "^1.49.1",
"svelte-loader": "^2.3.2",
"tslib": "^1.9.0",
"ts-node": "^4.1.0",
"typescript": "^2.6.2",
"webpack": "^4.1.0"

View File

@@ -21,12 +21,12 @@ export async function build() {
const { client, server, serviceworker } = create_compilers();
const client_stats = await compile(client);
console.log(clorox.inverse(`\nbuilt client`).toString());
console.log(`${clorox.inverse(`\nbuilt client`)}`);
console.log(client_stats.toString({ colors: true }));
fs.writeFileSync(path.join(output, 'client_info.json'), JSON.stringify(client_stats.toJson()));
const server_stats = await compile(server);
console.log(clorox.inverse(`\nbuilt server`).toString());
console.log(`${clorox.inverse(`\nbuilt server`)}`);
console.log(server_stats.toString({ colors: true }));
let serviceworker_stats;
@@ -38,7 +38,7 @@ export async function build() {
});
serviceworker_stats = await compile(serviceworker);
console.log(clorox.inverse(`\nbuilt service worker`).toString());
console.log(`${clorox.inverse(`\nbuilt service worker`)}`);
console.log(serviceworker_stats.toString({ colors: true }));
}

View File

@@ -77,7 +77,7 @@ export async function dev(opts: { port: number, open: boolean }) {
if (port) {
if (!await ports.check(port)) {
console.log(clorox.bold.red(`> Port ${port} is unavailable`));
console.log(`${clorox.bold.red(`> Port ${port} is unavailable`)}`);
return;
}
} else {
@@ -155,15 +155,15 @@ export async function dev(opts: { port: number, open: boolean }) {
compiler.watch({}, (err: Error, stats: any) => {
if (err) {
console.error(clorox.red(`${name}`));
console.error(clorox.red(err.message));
console.log(`${clorox.red(`${name}`)}`);
console.log(`${clorox.red(err.message)}`);
error(err);
} else {
const messages = format_messages(stats);
const info = stats.toJson();
if (messages.errors.length > 0) {
console.log(clorox.bold.red(`${name}`));
console.log(`${clorox.bold.red(`${name}`)}`);
const filtered = messages.errors.filter((message: string) => {
return !build.unique_errors.has(message);
@@ -180,7 +180,7 @@ export async function dev(opts: { port: number, open: boolean }) {
}
} else {
if (messages.warnings.length > 0) {
console.log(clorox.bold.yellow(`${name}`));
console.log(`${clorox.bold.yellow(`${name}`)}`);
const filtered = messages.warnings.filter((message: string) => {
return !build.unique_warnings.has(message);

View File

@@ -85,7 +85,7 @@ export async function exporter(export_dir: string) {
}
})
.catch((err: Error) => {
console.log(clorox.red(`> Error rendering ${url.pathname}: ${err.message}`));
console.log(`${clorox.red(`> Error rendering ${url.pathname}: ${err.message}`)}`);
});
}

View File

@@ -27,10 +27,10 @@ async function upgrade_sapper_main() {
if (/\%sapper\.main\%/.test(template)) {
if (!pattern.test(template)) {
console.log(clorox.red(`Could not replace %sapper.main% in ${file}`));
console.log(`${clorox.red(`Could not replace %sapper.main% in ${file}`)}`);
} else {
write(file, template.replace(pattern, `%sapper.scripts%`));
console.log(clorox.green(`Replaced %sapper.main% in ${file}`));
console.log(`${clorox.green(`Replaced %sapper.main% in ${file}`)}`);
replaced = true;
}
}