lui-testttt
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -5,13 +5,70 @@ #!/usr/bin/env node | ||
// const configFile = require("../lui.config.js"); | ||
console.log("cli calisti..."); | ||
const fileNames = ["./postcss.config.js", "lui.config.js", "main.css"]; | ||
let messages = []; | ||
// let luiConfigLocation = path.resolve(args["_"][1] ?? "./lui.config.js"); | ||
console.log("cli calisti..."); | ||
console.log(__dirname); | ||
let configLocation = path.resolve("./lui-preset.js"); | ||
let configFile = fs.readFileSync( | ||
path.resolve(__dirname, "../dist/lui-preset.js"), | ||
"utf8" | ||
); | ||
// console.log(configFile) | ||
fs.writeFileSync(configLocation, configFile, "utf8"); | ||
function isFileExist(fileName) { | ||
return fs.existsSync(fileName); | ||
} | ||
function createFile(location, file) { | ||
fs.writeFileSync(location, file, "utf8"); | ||
} | ||
function findLocation(fileName) { | ||
const fileName = path.resolve(fileName); | ||
return fileName; | ||
} | ||
function init() { | ||
for (let fileName of fileNames) { | ||
let location = findLocation(fileName); | ||
if (isFileExist(location)) { | ||
messages.push(`${path.basename(location)} already exists.`); | ||
} else { | ||
createFile(location, fileName); | ||
} | ||
} | ||
if (messages.length > 0) { | ||
console.log(); | ||
for (let message of messages) { | ||
console.log(message); | ||
} | ||
} | ||
} | ||
init(); | ||
// let postCssConfigLocation = path.resolve("./postcss.config.js"); | ||
// if (fs.existsSync(postCssConfigLocation)) { | ||
// messages.push(`${path.basename(postCssConfigLocation)} already exists.`); | ||
// } else { | ||
// fs.writeFileSync(postCssConfigLocation, postcssConfigFile, "utf8"); | ||
// console.log( | ||
// `Created PostCss config file: ${path.basename(tailwindConfigLocation)}` | ||
// ); | ||
// } | ||
// let luiConfigLocation = path.resolve("./lui-preset.js"); | ||
// let luiConfigFile = fs.readFileSync( | ||
// path.resolve(__dirname, "../dist/lui-preset.js"), | ||
// "utf8" | ||
// ); | ||
// let postcssConfigFile = fs.readFileSync( | ||
// path.resolve(__dirname, "../dist/postcss.config.js"), | ||
// "utf8" | ||
// ); | ||
// fs.writeFileSync(luiConfigLocation, luiConfigFile, "utf8"); | ||
// create postcss config | ||
// module.exports = { | ||
// plugins: { | ||
// tailwindcss: { config: './lui.config.js' }, | ||
// autoprefixer: {}, | ||
// }, | ||
// }; | ||
// if exist ? | ||
// create lui.config.js | ||
// if exist ? | ||
// set lui-preset-js to lui.config as preset, so user can costomize easly |
{ | ||
"name": "lui-testttt", | ||
"style": "dist/index.css", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14968
10
321