mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-11 23:23:10 +00:00
chore(npm): improved npm install process to work on more systems
Removed the node install script and just install directly with a node-script.
This commit is contained in:
parent
6f84539038
commit
b6b5410d19
2 changed files with 1 additions and 22 deletions
|
|
@ -1,21 +0,0 @@
|
|||
const { PythonShell } = require('python-shell');
|
||||
|
||||
PythonShell.defaultOptions = {};
|
||||
const options = {
|
||||
mode: 'text',
|
||||
args: ['pip', 'install', 'djlint'],
|
||||
pythonOptions: ['-u'],
|
||||
env: { PYCHARM_HOSTED: 1 },
|
||||
};
|
||||
|
||||
try {
|
||||
PythonShell.getVersionSync();
|
||||
|
||||
PythonShell.run('-m', options, function (error, results) {
|
||||
if (error) throw error;
|
||||
console.log(results.join('\n'));
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"format": "prettier --config .prettierrc \"{bin,docs}/**/*.{ts,css,less,scss,js,json,md,yaml,html}\" --write",
|
||||
"postinstall": "node ./bin/install.js",
|
||||
"postinstall": "python3 -m pip install --upgrade djlint",
|
||||
"pre-commit": "lint-staged",
|
||||
"commit": "git add . && pre-commit run; npm run pre-commit && cz --no-verify",
|
||||
"test": "xo"
|
||||
|
|
|
|||
Loading…
Reference in a new issue