@@ -12,12 +12,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
12
import '../helpers/setup' ;
13
13
import _ from 'lodash' ;
14
14
import fs from 'fs-extra' ;
15
- import glob from 'glob' ;
16
15
import path from 'path' ;
17
16
import request from 'superagent' ;
18
17
import semver from 'semver' ;
19
18
import globals from '../../app_modules/global' ;
20
- import rimraf from 'rimraf' ;
21
19
import moment from 'moment' ;
22
20
import { execSync } from 'child_process' ;
23
21
@@ -71,33 +69,6 @@ const getVersion = (version, release) => {
71
69
return version + suffix ;
72
70
} ;
73
71
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 ( / \- i n t e r n a l $ / , '' ) ;
83
- const directoryNew = directory . replace ( / \- i n t e r n a l $ / , '' ) ;
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
-
101
72
if ( process . env . HEROKU_APP_NAME ) {
102
73
exec ( 'rm -rf server/' ) ;
103
74
exec ( `git clone https://${ process . env . GITHUB_USER } :${ process . env . GITHUB_USER_ACCESS_TOKEN } @${ process . env . DEPLOY_REPO } server` ) ;
0 commit comments