make CLI files TypeScript files
This commit is contained in:
parent
fcb96f6847
commit
b1dae3bb5e
10 changed files with 12 additions and 29 deletions
|
|
@ -1 +1 @@
|
|||
require('./cli/index')
|
||||
import './cli/index'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// @ts-check
|
||||
|
||||
import {
|
||||
// @ts-ignore
|
||||
lazyPostcss,
|
||||
|
|
@ -12,7 +10,7 @@ import {
|
|||
|
||||
// @ts-ignore
|
||||
lazyAutoprefixer,
|
||||
} from '../../../../peers/index.js'
|
||||
} from '../../../../peers/index'
|
||||
|
||||
/**
|
||||
* @returns {import('postcss')}
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
// @ts-check
|
||||
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { createProcessor } from './plugin.js'
|
||||
import { createProcessor } from './plugin'
|
||||
|
||||
export async function build(args, configs) {
|
||||
let input = args['--input']
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// @ts-check
|
||||
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
import postcssrc from 'postcss-load-config'
|
||||
|
|
@ -11,12 +9,12 @@ import tailwind from '../../../processTailwindFeatures'
|
|||
import { loadAutoprefixer, loadCssNano, loadPostcss, loadPostcssImport } from './deps'
|
||||
import { formatNodes, drainStdin, outputFile } from './utils'
|
||||
import { env } from '../shared'
|
||||
import resolveConfig from '../../../../resolveConfig.js'
|
||||
import getModuleDependencies from '../../../lib/getModuleDependencies.js'
|
||||
import { parseCandidateFiles } from '../../../lib/content.js'
|
||||
import { createWatcher } from './watching.js'
|
||||
import resolveConfig from '../../../../resolveConfig'
|
||||
import getModuleDependencies from '../../../lib/getModuleDependencies'
|
||||
import { parseCandidateFiles } from '../../../lib/content'
|
||||
import { createWatcher } from './watching'
|
||||
import fastGlob from 'fast-glob'
|
||||
import { findAtConfigPath } from '../../../lib/findAtConfigPath.js'
|
||||
import { findAtConfigPath } from '../../../lib/findAtConfigPath'
|
||||
import log from '../../../util/log'
|
||||
|
||||
/**
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// @ts-check
|
||||
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
// @ts-check
|
||||
|
||||
import chokidar from 'chokidar'
|
||||
import fs from 'fs'
|
||||
import micromatch from 'micromatch'
|
||||
import normalizePath from 'normalize-path'
|
||||
import path from 'path'
|
||||
|
||||
import { readFileWithRetries } from './utils.js'
|
||||
import { readFileWithRetries } from './utils'
|
||||
|
||||
/**
|
||||
* The core idea of this watcher is:
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
// @ts-check
|
||||
import packageJson from '../../../../package.json'
|
||||
|
||||
export function help({ message, usage, commands, options }) {
|
||||
|
|
@ -8,8 +8,6 @@ import { build } from './build'
|
|||
import { help } from './help'
|
||||
import { init } from './init'
|
||||
|
||||
console.log('HELLO FROM OXIDE')
|
||||
|
||||
function isESM() {
|
||||
const pkgPath = path.resolve('./package.json')
|
||||
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// @ts-check
|
||||
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
|
|
@ -12,8 +10,8 @@ export function init(args, configs) {
|
|||
} else {
|
||||
let stubFile = fs.readFileSync(
|
||||
args['--full']
|
||||
? path.resolve(__dirname, '../../../stubs/defaultConfig.stub.js')
|
||||
: path.resolve(__dirname, '../../../stubs/simpleConfig.stub.js'),
|
||||
? path.resolve(__dirname, '../../../../stubs/defaultConfig.stub.js')
|
||||
: path.resolve(__dirname, '../../../../stubs/simpleConfig.stub.js'),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
|
@ -31,7 +29,7 @@ export function init(args, configs) {
|
|||
messages.push(`${path.basename(postcssConfigLocation)} already exists.`)
|
||||
} else {
|
||||
let stubFile = fs.readFileSync(
|
||||
path.resolve(__dirname, '../../../stubs/defaultPostCssConfig.stub.js'),
|
||||
path.resolve(__dirname, '../../../../stubs/defaultPostCssConfig.stub.js'),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// @ts-check
|
||||
|
||||
export const env = {
|
||||
DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0',
|
||||
OXIDE: process.env.OXIDE,
|
||||
Loading…
Add table
Add a link
Reference in a new issue