removed gulp and implement cli and astro

This commit is contained in:
Daniel
2023-02-19 21:40:29 +05:30
parent 034bda7138
commit 3113ac5efe
33 changed files with 8416 additions and 11089 deletions

14
src/config/.eslintrc.json Normal file
View 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"
}
}

View 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)
}

View 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'
})

View 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
}
}
}

View 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()]
}