mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
eslint: fix import/order
This commit is contained in:
parent
46216e6548
commit
ed5bfacb4d
@ -1,6 +1,8 @@
|
||||
const { Utils } = require('../..')
|
||||
|
||||
const { resolve } = require('path')
|
||||
const { existsSync } = require('fs')
|
||||
|
||||
const { Utils } = require('../..')
|
||||
const { requireModule } = require('../../lib/common/module')
|
||||
|
||||
const getRootDir = argv => resolve(argv._[0] || '.')
|
||||
|
@ -2,8 +2,8 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const fs = require('fs')
|
||||
const parseArgs = require('minimist')
|
||||
const { resolve } = require('path')
|
||||
const parseArgs = require('minimist')
|
||||
|
||||
const { Nuxt, Utils } = require('..')
|
||||
const { loadNuxtConfig, getLatestHost } = require('./common/utils')
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import { Nuxt, Builder } from 'nuxt'
|
||||
import { resolve } from 'path'
|
||||
|
||||
// We keep the nuxt and server instance
|
||||
// So we can close them at the end of the test
|
||||
|
@ -1,6 +1,7 @@
|
||||
import http from 'http'
|
||||
|
||||
import { Nuxt, Builder } from 'nuxt'
|
||||
import express from 'express'
|
||||
import http from 'http'
|
||||
import SocketIO from 'socket.io'
|
||||
|
||||
const port = process.env.PORT || 3000
|
||||
|
@ -1,6 +1,7 @@
|
||||
import vuxLoader from 'vux-loader'
|
||||
import path from 'path'
|
||||
|
||||
import vuxLoader from 'vux-loader'
|
||||
|
||||
export default {
|
||||
head: {
|
||||
meta: [
|
||||
|
@ -1,22 +1,25 @@
|
||||
import util from 'util'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
import _ from 'lodash'
|
||||
import chokidar from 'chokidar'
|
||||
import fsExtra from 'fs-extra'
|
||||
import fs from 'fs'
|
||||
import hash from 'hash-sum'
|
||||
import webpack from 'webpack'
|
||||
import serialize from 'serialize-javascript'
|
||||
import path from 'path'
|
||||
import MFS from 'memory-fs'
|
||||
import webpackDevMiddleware from 'webpack-dev-middleware'
|
||||
import webpackHotMiddleware from 'webpack-hot-middleware'
|
||||
import Debug from 'debug'
|
||||
import Glob from 'glob'
|
||||
import upath from 'upath'
|
||||
|
||||
import { r, wp, wChunk, createRoutes, parallel, relativeTo, waitFor, createSpinner } from '../common/utils'
|
||||
import Options from '../common/options'
|
||||
|
||||
import clientWebpackConfig from './webpack/client.config'
|
||||
import serverWebpackConfig from './webpack/server.config'
|
||||
import upath from 'upath'
|
||||
|
||||
const debug = Debug('nuxt:build')
|
||||
debug.color = 2 // Force green color
|
||||
|
@ -1,5 +1,5 @@
|
||||
import _ from 'lodash'
|
||||
import path from 'path'
|
||||
import _ from 'lodash'
|
||||
import htmlMinifier from 'html-minifier'
|
||||
import Chalk from 'chalk'
|
||||
import fsExtra from 'fs-extra'
|
||||
@ -247,6 +247,8 @@ export default class Generator {
|
||||
}
|
||||
}
|
||||
|
||||
path = 123
|
||||
|
||||
let _path
|
||||
|
||||
if (this.options.generate.subFolders) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
import path from 'path'
|
||||
|
||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||
import TimeFixPlugin from 'time-fix-plugin'
|
||||
import WarnFixPlugin from './plugins/warnfix'
|
||||
import ProgressPlugin from './plugins/progress'
|
||||
|
||||
import webpack from 'webpack'
|
||||
import _ from 'lodash'
|
||||
import path from 'path'
|
||||
|
||||
import { isUrl, urlJoin } from '../../common/utils'
|
||||
|
||||
import WarnFixPlugin from './plugins/warnfix'
|
||||
import ProgressPlugin from './plugins/progress'
|
||||
import vueLoader from './vue-loader'
|
||||
import styleLoader from './style-loader'
|
||||
|
||||
|
@ -1,15 +1,18 @@
|
||||
import path from 'path'
|
||||
|
||||
import _ from 'lodash'
|
||||
import webpack from 'webpack'
|
||||
// import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
|
||||
import VueSSRClientPlugin from './plugins/vue/client'
|
||||
import HTMLPlugin from 'html-webpack-plugin'
|
||||
import FriendlyErrorsWebpackPlugin from '@nuxtjs/friendly-errors-webpack-plugin'
|
||||
import StylishPlugin from 'webpack-stylish'
|
||||
import BundleAnalyzer from 'webpack-bundle-analyzer'
|
||||
import path from 'path'
|
||||
|
||||
import Debug from 'debug'
|
||||
import base from './base.config'
|
||||
|
||||
// import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
|
||||
import VueSSRClientPlugin from './plugins/vue/client'
|
||||
|
||||
const debug = Debug('nuxt:build')
|
||||
debug.color = 2 // Force green color
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
import ـ from 'lodash'
|
||||
import { isPureObject } from '../../common/utils'
|
||||
import createResolver from 'postcss-import-resolver'
|
||||
|
||||
import { isPureObject } from '../../common/utils'
|
||||
|
||||
export default function postcssConfig() {
|
||||
let config = ـ.cloneDeep(this.options.build.postcss)
|
||||
|
||||
|
@ -1,12 +1,15 @@
|
||||
import webpack from 'webpack'
|
||||
// import VueSSRServerPlugin from 'vue-server-renderer/server-plugin'
|
||||
import VueSSRServerPlugin from './plugins/vue/server'
|
||||
import nodeExternals from 'webpack-node-externals'
|
||||
import _ from 'lodash'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
import webpack from 'webpack'
|
||||
import nodeExternals from 'webpack-node-externals'
|
||||
import _ from 'lodash'
|
||||
|
||||
import base from './base.config'
|
||||
|
||||
// import VueSSRServerPlugin from 'vue-server-renderer/server-plugin'
|
||||
import VueSSRServerPlugin from './plugins/vue/server'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Webpack Server Config
|
||||
|
@ -1,5 +1,7 @@
|
||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||
import path from 'path'
|
||||
|
||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||
|
||||
import postcssConfig from './postcss'
|
||||
|
||||
export default function styleLoader(ext, loaders = [], isVueLoader = false) {
|
||||
|
@ -1,8 +1,9 @@
|
||||
import _ from 'lodash'
|
||||
import Debug from 'debug'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
import _ from 'lodash'
|
||||
import Debug from 'debug'
|
||||
|
||||
import { isUrl, isPureObject } from '../common/utils'
|
||||
|
||||
import modes from './modes'
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Youch from '@nuxtjs/youch'
|
||||
import path from 'path'
|
||||
|
||||
import Youch from '@nuxtjs/youch'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
export default function errorMiddleware(err, req, res, next) {
|
||||
|
@ -1,16 +1,19 @@
|
||||
import Module from 'module'
|
||||
import path from 'path'
|
||||
|
||||
import Debug from 'debug'
|
||||
import enableDestroy from 'server-destroy'
|
||||
import Module from 'module'
|
||||
import _ from 'lodash'
|
||||
import chalk from 'chalk'
|
||||
import fs from 'fs-extra'
|
||||
import path from 'path'
|
||||
|
||||
import Options from '../common/options'
|
||||
import { sequence, printError } from '../common/utils'
|
||||
import packageJSON from '../../package.json'
|
||||
import moduleUtil from '../common/module'
|
||||
|
||||
import ModuleContainer from './module'
|
||||
import Renderer from './renderer'
|
||||
import moduleUtil from '../common/module'
|
||||
|
||||
const debug = Debug('nuxt:')
|
||||
debug.color = 5
|
||||
|
@ -1,15 +1,16 @@
|
||||
import path from 'path'
|
||||
import crypto from 'crypto'
|
||||
|
||||
import ansiHTML from 'ansi-html'
|
||||
import serialize from 'serialize-javascript'
|
||||
import serveStatic from 'serve-static'
|
||||
import compression from 'compression'
|
||||
import _ from 'lodash'
|
||||
import path from 'path'
|
||||
import fs from 'fs-extra'
|
||||
import vueServerRenderer from 'vue-server-renderer'
|
||||
import Debug from 'debug'
|
||||
import connect from 'connect'
|
||||
import launchMiddleware from 'launch-editor-middleware'
|
||||
import crypto from 'crypto'
|
||||
|
||||
import { setAnsiColors, isUrl, waitFor, timeout } from '../common/utils'
|
||||
import defaults from '../common/nuxt.config'
|
||||
|
@ -1,5 +1,7 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Options } from '..'
|
||||
import { version } from '../package.json'
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import * as browser from './helpers/browser'
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Builder, Generator } from '..'
|
||||
|
||||
import { intercept } from './helpers/console'
|
||||
|
||||
test('Fail with routes() which throw an error', async t => {
|
||||
|
@ -1,13 +1,16 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import { remove } from 'fs-extra'
|
||||
import http from 'http'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import { remove } from 'fs-extra'
|
||||
import serveStatic from 'serve-static'
|
||||
import finalhandler from 'finalhandler'
|
||||
import rp from 'request-promise-native'
|
||||
import { interceptLog, release } from './helpers/console'
|
||||
|
||||
import { Nuxt, Builder, Generator } from '..'
|
||||
|
||||
import { interceptLog, release } from './helpers/console'
|
||||
import { loadConfig } from './helpers/config'
|
||||
|
||||
const port = 4002
|
||||
|
@ -1,7 +1,10 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import rp from 'request-promise-native'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
const port = 4005
|
||||
|
@ -1,7 +1,10 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import rp from 'request-promise-native'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import { interceptLog, interceptError, release } from './helpers/console'
|
||||
|
||||
const port = 4004
|
||||
|
@ -1,6 +1,9 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Builder, Utils } from '..'
|
||||
|
||||
import * as browser from './helpers/browser'
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
const port = 4013
|
||||
|
@ -1,8 +1,11 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
import fs from 'fs'
|
||||
import { Nuxt, Builder } from '..'
|
||||
import { promisify } from 'util'
|
||||
|
||||
import test from 'ava'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
const readFile = promisify(fs.readFile)
|
||||
|
@ -1,8 +1,10 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import test from 'ava'
|
||||
import express from 'express'
|
||||
import rp from 'request-promise-native'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
import { interceptLog } from './helpers/console'
|
||||
|
||||
const port = 4000
|
||||
|
@ -1,12 +1,15 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import http from 'http'
|
||||
import { existsSync } from 'fs'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import serveStatic from 'serve-static'
|
||||
import finalhandler from 'finalhandler'
|
||||
import rp from 'request-promise-native'
|
||||
import { intercept, interceptLog } from './helpers/console'
|
||||
|
||||
import { Nuxt, Builder, Generator, Options } from '..'
|
||||
|
||||
import { intercept, interceptLog } from './helpers/console'
|
||||
import { loadConfig } from './helpers/config'
|
||||
|
||||
const port = 4015
|
||||
|
@ -1,7 +1,10 @@
|
||||
import test from 'ava'
|
||||
import { normalize } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import rp from 'request-promise-native'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
|
||||
import { intercept } from './helpers/console'
|
||||
import { loadConfig } from './helpers/config'
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
import test from 'ava'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import test from 'ava'
|
||||
import rp from 'request-promise-native'
|
||||
|
||||
import { Nuxt, Builder } from '..'
|
||||
import styleLoader from '../lib/builder/webpack/style-loader'
|
||||
|
||||
import { interceptLog, release } from './helpers/console'
|
||||
import { loadConfig } from './helpers/config'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user