removed gulp and implement cli and astro
This commit is contained in:
14
src/config/.eslintrc.json
Normal file
14
src/config/.eslintrc.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"unicorn/prefer-top-level-await": "off"
|
||||
}
|
||||
}
|
||||
8
src/config/assets.config.mjs
Normal file
8
src/config/assets.config.mjs
Normal file
@@ -0,0 +1,8 @@
|
||||
import fs from 'fs-extra'
|
||||
|
||||
try {
|
||||
fs.copySync('./src/assets', './dist/assets')
|
||||
console.log('Assets copy success!')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
12
src/config/astro.config.mjs
Normal file
12
src/config/astro.config.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineConfig } from 'astro/config'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
build: {
|
||||
// Example: Generate `page.html` instead of `page/index.html` during build.
|
||||
format: 'file'
|
||||
},
|
||||
// base: './dist',
|
||||
srcDir: './src/html',
|
||||
outDir: './dist/pages'
|
||||
})
|
||||
15
src/config/postcss.config.mjs
Normal file
15
src/config/postcss.config.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
export default ctx => {
|
||||
return {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
},
|
||||
rtlcss: ctx.env === 'RTL' ? {} : false
|
||||
}
|
||||
}
|
||||
}
|
||||
21
src/config/rollup.config.js
Normal file
21
src/config/rollup.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const typescript = require('@rollup/plugin-typescript')
|
||||
// import * as pkg from '../../package.json'
|
||||
const pkg = require('../../package.json')
|
||||
|
||||
const year = new Date().getFullYear()
|
||||
const banner = `/*!
|
||||
* AdminLTE v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2014-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
|
||||
*/`
|
||||
|
||||
module.exports = {
|
||||
input: 'src/ts/adminlte.ts',
|
||||
output: {
|
||||
file: 'dist/js/adminlte.js',
|
||||
format: 'umd',
|
||||
banner,
|
||||
name: 'adminlte'
|
||||
},
|
||||
plugins: [typescript()]
|
||||
}
|
||||
Reference in New Issue
Block a user