mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 19:36:20 +00:00
chore(core/strapi): remove postinstall
This commit is contained in:
parent
4abb081aed
commit
157058b96a
@ -70,7 +70,6 @@
|
||||
"files": [
|
||||
"./dist",
|
||||
"./bin",
|
||||
"./scripts",
|
||||
"./resources",
|
||||
"index.js"
|
||||
],
|
||||
@ -79,7 +78,6 @@
|
||||
"build:ts": "run build",
|
||||
"clean": "run -T rimraf ./dist",
|
||||
"copy-files": "copyfiles -u 1 -a 'src/**/*.html' 'src/**/*.png' dist",
|
||||
"postinstall": "node ./scripts/postinstall.js",
|
||||
"lint": "run -T eslint .",
|
||||
"prepublishOnly": "yarn clean && yarn build",
|
||||
"test:unit": "run -T jest",
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
try {
|
||||
require('./dist/utils/postinstall');
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
import fetch from 'node-fetch';
|
||||
import machineID from './machine-id';
|
||||
|
||||
/*
|
||||
* No need to worry about this file, we only retrieve anonymous data here.
|
||||
* It allows us to know on how many times the package has been installed globally.
|
||||
*/
|
||||
|
||||
try {
|
||||
if (
|
||||
process.env.npm_config_global === 'true' ||
|
||||
JSON.parse(process.env.npm_config_argv as any).original.includes('global')
|
||||
) {
|
||||
const event = 'didInstallStrapi';
|
||||
fetch('https://analytics.strapi.io/api/v2/track', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
event,
|
||||
deviceId: machineID(),
|
||||
}),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Strapi-Event': event,
|
||||
},
|
||||
}).catch(() => {});
|
||||
}
|
||||
} catch (e) {
|
||||
// ...
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user