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:
Lai Jiang 2019-11-04 15:22:32 -05:00 committed by GitHub
parent bd53fb3bc0
commit 82dcc88f9c
5 changed files with 4 additions and 4 deletions

1
.gitignore vendored
View file

@ -98,7 +98,6 @@ nomulus.iws
.gradle/ .gradle/
**/build **/build
node_modules/** node_modules/**
!node_modules/soyutils_usegoog.js
/repos/ /repos/
# Compiled JS/CSS code # Compiled JS/CSS code

View file

@ -80,7 +80,7 @@ PRESUBMITS = {
".git", "/build/", "/generated/", "node_modules/", ".git", "/build/", "/generated/", "node_modules/",
"JUnitBackports.java", "registrar_bin.", "registrar_dbg.", "JUnitBackports.java", "registrar_bin.", "registrar_dbg.",
"google-java-format-diff.py", "google-java-format-diff.py",
"nomulus.golden.sql" "nomulus.golden.sql", "soyutils_usegoog.js"
}, REQUIRED): }, REQUIRED):
"File did not include the license header.", "File did not include the license header.",

View file

@ -523,7 +523,7 @@ task compileProdJS(type: JavaExec) {
// manually include all the required js files // manually include all the required js files
closureArgs << "--js=${nodeModulesDir}/google-closure-library/**.js" 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=${cssSourceDir}/registrar_bin.css.js"
closureArgs << "--js=${jsSourceDir}/**.js" closureArgs << "--js=${jsSourceDir}/**.js"
// TODO(shicong) Verify the compiled JS file works in Alpha // TODO(shicong) Verify the compiled JS file works in Alpha
@ -555,7 +555,7 @@ task karmaTest(type: Exec) {
dependsOn ':npmInstall' dependsOn ':npmInstall'
workingDir rootProject.projectDir workingDir rootProject.projectDir
executable 'node_modules/karma/bin/karma' executable 'node_modules/karma/bin/karma'
args('start') args('start', "${project.projectDir}/karma.conf.js")
} }
test.dependsOn karmaTest test.dependsOn karmaTest

View file

@ -16,6 +16,7 @@ process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function(config) { module.exports = function(config) {
config.set({ config.set({
basePath: '..',
browsers: ['ChromeHeadlessNoSandbox'], browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: { customLaunchers: {
ChromeHeadlessNoSandbox: { ChromeHeadlessNoSandbox: {