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:
Christopher Pickering 2022-07-29 09:55:33 -05:00
parent 6f84539038
commit b6b5410d19
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84
2 changed files with 1 additions and 22 deletions

View file

@ -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);
}

View file

@ -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"