Skip to content

Commit 2abb026

Browse files
committed
Remove unused design-token scripts
1 parent efc1f88 commit 2abb026

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

.npmrc-heroku

Lines changed: 0 additions & 1 deletion
This file was deleted.

app.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"name": "Salesforce Lightning Design System",
33
"buildpacks": [
4-
{
5-
"url": "https://github.com/aputinski/heroku-buildpack-npmrc"
6-
},
74
{
85
"url": "https://github.com/heroku/heroku-buildpack-nodejs"
96
}

scripts/npm/postinstall.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1212
import '../helpers/setup';
1313
import _ from 'lodash';
1414
import fs from 'fs-extra';
15-
import glob from 'glob';
1615
import path from 'path';
1716
import request from 'superagent';
1817
import semver from 'semver';
1918
import globals from '../../app_modules/global';
20-
import rimraf from 'rimraf';
2119
import moment from 'moment';
2220
import { execSync } from 'child_process';
2321

@@ -71,33 +69,6 @@ const getVersion = (version, release) => {
7169
return version + suffix;
7270
};
7371

74-
// HACK: Copy "*-internal" modules so they can be required as normal
75-
glob.sync('node_modules/@salesforce-ux/*-internal', { cwd: local() }).forEach(directory => {
76-
// Get the package.json for the design-system
77-
const packageJSON = require(local('package.json'));
78-
// Loop over each "*-internal" module
79-
const moduleName = _.takeRight(directory.split(path.sep), 2).join(path.sep);
80-
// See if the "*-internal" module is an actual dependency
81-
if (packageJSON.dependencies[moduleName] || packageJSON.devDependencies[moduleName]) {
82-
const moduleNameNew = moduleName.replace(/\-internal$/, '');
83-
const directoryNew = directory.replace(/\-internal$/, '');
84-
// Make a copy and remove the "-internal" suffix
85-
fs.copySync(directory, directoryNew, {
86-
clobber: true
87-
}, err => {});
88-
// Update the copy's package.json to the cleaned package name
89-
fs.writeFileSync(
90-
`./${directoryNew}/package.json`,
91-
fs.readFileSync(`./${directoryNew}/package.json`)
92-
.toString()
93-
.replace(new RegExp(_.escapeRegExp(moduleName), 'g'), moduleNameNew)
94-
);
95-
} else {
96-
// the "*-internal" module is not a dependency, so remove it
97-
rimraf.sync(directory);
98-
}
99-
});
100-
10172
if (process.env.HEROKU_APP_NAME) {
10273
exec('rm -rf server/');
10374
exec(`git clone https://${process.env.GITHUB_USER}:${process.env.GITHUB_USER_ACCESS_TOKEN}@${process.env.DEPLOY_REPO} server`);

0 commit comments

Comments
 (0)