mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 22:05:20 +00:00
Move build.ts and export.ts into src/cli - fixes #115
This commit is contained in:
@@ -2,9 +2,7 @@ import * as fs from 'fs';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import mkdirp from 'mkdirp';
|
import mkdirp from 'mkdirp';
|
||||||
import rimraf from 'rimraf';
|
import rimraf from 'rimraf';
|
||||||
import create_compilers from './create_compilers.js';
|
import { create_compilers, create_app, create_assets } from 'sapper/core.js';
|
||||||
import create_app from './create_app.js';
|
|
||||||
import create_assets from './create_assets.js';
|
|
||||||
|
|
||||||
export default function build({
|
export default function build({
|
||||||
src,
|
src,
|
||||||
@@ -4,8 +4,7 @@ import express from 'express';
|
|||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import URL from 'url-parse';
|
import URL from 'url-parse';
|
||||||
import create_assets from './create_assets.js';
|
import { create_assets } from 'sapper/core.js';
|
||||||
// import middleware from '../middleware/index.js';
|
|
||||||
|
|
||||||
const { PORT = 3000, OUTPUT_DIR = 'dist' } = process.env;
|
const { PORT = 3000, OUTPUT_DIR = 'dist' } = process.env;
|
||||||
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { build, export as exporter } from 'sapper/core.js';
|
import build from './build.js';
|
||||||
|
import exporter from './export.js';
|
||||||
import { dest, entry, isDev, src } from '../config';
|
import { dest, entry, isDev, src } from '../config';
|
||||||
|
|
||||||
process.env.NODE_ENV = 'production';
|
process.env.NODE_ENV = 'production';
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import { create_templates, render, stream } from './templates'; // TODO templates is an anomaly... fix post-#91
|
import { create_templates, render, stream } from './templates'; // TODO templates is an anomaly... fix post-#91
|
||||||
|
|
||||||
export { default as build } from './build';
|
|
||||||
export { default as export } from './export.js';
|
|
||||||
|
|
||||||
export { default as create_app } from './create_app';
|
export { default as create_app } from './create_app';
|
||||||
export { default as create_assets } from './create_assets';
|
export { default as create_assets } from './create_assets';
|
||||||
export { default as create_compilers } from './create_compilers';
|
export { default as create_compilers } from './create_compilers';
|
||||||
|
|||||||
Reference in New Issue
Block a user