mirror of
https://github.com/google/nomulus
synced 2026-01-07 14:05:44 +00:00
Move soyutils_usegoog.js out of node_modules (#342)
* Move soyutils_usegoog.js out of node_modules Everytime the npmInstall runs, it removes this file from node_modules. Move it outside the folder to prevent this from happening. * Move karma.conf.js and soyutils_usegooge.js * Move karma.conf.js to be under core
This commit is contained in:
@@ -523,7 +523,7 @@ task compileProdJS(type: JavaExec) {
|
||||
|
||||
// manually include all the required js files
|
||||
closureArgs << "--js=${nodeModulesDir}/google-closure-library/**.js"
|
||||
closureArgs << "--js=${nodeModulesDir}/soyutils_usegoog.js"
|
||||
closureArgs << "--js=${jsDir}/soyutils_usegoog.js"
|
||||
closureArgs << "--js=${cssSourceDir}/registrar_bin.css.js"
|
||||
closureArgs << "--js=${jsSourceDir}/**.js"
|
||||
// TODO(shicong) Verify the compiled JS file works in Alpha
|
||||
@@ -555,7 +555,7 @@ task karmaTest(type: Exec) {
|
||||
dependsOn ':npmInstall'
|
||||
workingDir rootProject.projectDir
|
||||
executable 'node_modules/karma/bin/karma'
|
||||
args('start')
|
||||
args('start', "${project.projectDir}/karma.conf.js")
|
||||
}
|
||||
|
||||
test.dependsOn karmaTest
|
||||
|
||||
80
core/karma.conf.js
Normal file
80
core/karma.conf.js
Normal file
@@ -0,0 +1,80 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath()
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '..',
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
frameworks: ['jasmine', 'closure'],
|
||||
singleRun: true,
|
||||
autoWatch: false,
|
||||
files: [
|
||||
'node_modules/google-closure-library/closure/goog/base.js',
|
||||
'core/src/test/javascript/**/*_test.js',
|
||||
{
|
||||
pattern: 'core/src/test/javascript/**/!(*_test).js',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'core/src/main/javascript/**/*.js',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'core/build/generated/source/custom/main/**/*.soy.js',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'node_modules/soyutils_usegoog.js',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'node_modules/google-closure-library/closure/goog/deps.js',
|
||||
included: false,
|
||||
served: false
|
||||
},
|
||||
{
|
||||
pattern: 'node_modules/google-closure-library/closure/goog/**/*.js',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'core/build/resources/main/google/registry/ui/assets/images/*.png',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'core/build/resources/main/google/registry/ui/assets/images/icons/svg/*.svg',
|
||||
included: false
|
||||
}
|
||||
],
|
||||
preprocessors: {
|
||||
'node_modules/google-closure-library/closure/goog/deps.js': ['closure', 'closure-deps'],
|
||||
'node_modules/google-closure-library/closure/goog/base.js': ['closure'],
|
||||
'node_modules/google-closure-library/closure/**/*.js': ['closure'],
|
||||
'core/src/*/javascript/**/*.js': ['closure'],
|
||||
'core/build/generated/source/custom/main/**/*.soy.js': ['closure'],
|
||||
'node_modules/soyutils_usegoog.js': ['closure']
|
||||
},
|
||||
proxies: {
|
||||
"/assets/": "/base/core/build/resources/main/google/registry/ui/assets/"
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
2457
core/src/main/javascript/soyutils_usegoog.js
Normal file
2457
core/src/main/javascript/soyutils_usegoog.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user