mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
Remove prepublish script (#12702)
This commit is contained in:
parent
d142f1ef4b
commit
75188c68d0
9
.vscode/tasks.json
vendored
9
.vscode/tasks.json
vendored
@ -19,6 +19,15 @@
|
||||
"runOn": "folderOpen",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "Watch code generation",
|
||||
"detail": "Watch files and generate types when files are changed",
|
||||
"type": "npm",
|
||||
"script": "watch-generate",
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
},
|
||||
{
|
||||
"label": "stylelint",
|
||||
"command": "yarn",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"dev": "yarn run build-inline-extensions && NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/development",
|
||||
"dev:no-reload": "AUTO_RELOAD=false yarn run dev",
|
||||
"dev:firefox": "if type web-ext 2>/dev/null; then web-ext run --source-dir ./build/firefox; else echo 'web-ext not found. Install it with: yarn global add web-ext'; exit 1; fi",
|
||||
"build": "yarn run build-inline-extensions && NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/build",
|
||||
"build": "yarn --cwd .. generate && yarn run build-inline-extensions && NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/build",
|
||||
"release": "yarn release:chrome",
|
||||
"release:chrome": "webstore upload --auto-publish --source build/bundles/chrome-bundle.zip --extension-id dgjhfomjieaadpoljlnidmbgkdffpack --client-id $GOOGLE_CLIENT_ID --client-secret $GOOGLE_CLIENT_SECRET --refresh-token $GOOGLE_REFRESH_TOKEN",
|
||||
"release:ff": "./scripts/release-ff.sh",
|
||||
|
||||
@ -7,6 +7,9 @@ echo "--- yarn"
|
||||
yarn --mutex network --frozen-lockfile --network-timeout 60000
|
||||
yarn --mutex network --cwd dev/release --frozen-lockfile --network-timeout 60000
|
||||
|
||||
echo "--- generate"
|
||||
yarn gulp generate
|
||||
|
||||
for cmd in "$@"; do
|
||||
echo "--- $cmd"
|
||||
yarn -s run "$cmd"
|
||||
|
||||
@ -6,6 +6,9 @@ echo "--- yarn in root"
|
||||
# mutex is necessary since CI runs various yarn installs in parallel
|
||||
yarn --mutex network --frozen-lockfile --network-timeout 60000
|
||||
|
||||
echo "--- generate"
|
||||
yarn gulp generate
|
||||
|
||||
cd "$1"
|
||||
echo "--- test"
|
||||
|
||||
|
||||
@ -129,6 +129,7 @@ func addSharedTests(c Config) func(pipeline *bk.Pipeline) {
|
||||
pipeline.AddStep(":chromatic:",
|
||||
bk.AutomaticRetry(5),
|
||||
bk.Cmd("yarn --mutex network --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn gulp generate"),
|
||||
bk.Cmd(chromaticCommand))
|
||||
|
||||
// Shared tests
|
||||
|
||||
11
gulpfile.js
11
gulpfile.js
@ -16,6 +16,11 @@ const { webpack: webWebpack, webpackDevServer: webWebpackDevServer } = require('
|
||||
*/
|
||||
const generate = gulp.parallel(schema, graphQlSchema, graphQlOperations)
|
||||
|
||||
/**
|
||||
* Generates files needed for builds whenever files change.
|
||||
*/
|
||||
const watchGenerate = gulp.series(generate, gulp.parallel(watchSchema, watchGraphQlSchema, watchGraphQlOperations))
|
||||
|
||||
/**
|
||||
* Builds everything.
|
||||
*/
|
||||
@ -24,13 +29,11 @@ const build = gulp.series(generate, webWebpack)
|
||||
/**
|
||||
* Watches everything and rebuilds on file changes.
|
||||
*/
|
||||
const watch = gulp.series(
|
||||
generate,
|
||||
gulp.parallel(watchSchema, watchGraphQlSchema, watchGraphQlOperations, webWebpackDevServer)
|
||||
)
|
||||
const watch = gulp.series(generate, gulp.parallel(watchGenerate, webWebpackDevServer))
|
||||
|
||||
module.exports = {
|
||||
generate,
|
||||
watchGenerate,
|
||||
build,
|
||||
watch,
|
||||
schema,
|
||||
|
||||
@ -18,8 +18,9 @@
|
||||
"all:tsgql": "yarn --cwd web run tsgql validate -p . --exitOnWarn && yarn --cwd shared run tsgql validate -p . --exitOnWarn && yarn --cwd browser run tsgql validate -p . --exitOnWarn",
|
||||
"build-ts": "tsc -b .",
|
||||
"graphql-lint": "graphql-schema-linter --old-implements-syntax --comment-descriptions cmd/frontend/graphqlbackend/schema.graphql",
|
||||
"prepublish": "gulp generate",
|
||||
"build-web": "yarn --cwd web run build",
|
||||
"generate": "gulp generate",
|
||||
"watch-generate": "gulp watchGenerate",
|
||||
"test": "jest --testPathIgnorePatterns end-to-end regression integration storybook",
|
||||
"test-integration": "TS_NODE_PROJECT=web/src/integration/tsconfig.json NODE_NO_WARNINGS=1 mocha ./web/src/integration/**/*.test.ts",
|
||||
"cover-integration": "nyc --hook-require=false yarn test-integration",
|
||||
|
||||
@ -4,7 +4,14 @@ const log = require('fancy-log')
|
||||
const gulp = require('gulp')
|
||||
const createWebpackCompiler = require('webpack')
|
||||
const WebpackDevServer = require('webpack-dev-server')
|
||||
const { graphQlSchema, schema, watchGraphQlSchema, watchSchema } = require('../shared/gulpfile')
|
||||
const {
|
||||
graphQlSchema,
|
||||
graphQlOperations,
|
||||
schema,
|
||||
watchGraphQlSchema,
|
||||
watchGraphQlOperations,
|
||||
watchSchema,
|
||||
} = require('../shared/gulpfile')
|
||||
const webpackConfig = require('./webpack.config')
|
||||
|
||||
const WEBPACK_STATS_OPTIONS = {
|
||||
@ -72,7 +79,7 @@ async function webpackDevelopmentServer() {
|
||||
/**
|
||||
* Builds everything.
|
||||
*/
|
||||
const build = gulp.parallel(gulp.series(gulp.parallel(schema, graphQlSchema), gulp.parallel(webpack)))
|
||||
const build = gulp.series(gulp.parallel(schema, graphQlOperations, graphQlSchema), gulp.parallel(webpack))
|
||||
|
||||
/**
|
||||
* Watches everything and rebuilds on file changes.
|
||||
@ -80,7 +87,7 @@ const build = gulp.parallel(gulp.series(gulp.parallel(schema, graphQlSchema), gu
|
||||
const watch = gulp.series(
|
||||
// Ensure the typings that TypeScript depends on are build to avoid first-time-run errors
|
||||
gulp.parallel(schema, graphQlSchema),
|
||||
gulp.parallel(watchSchema, watchGraphQlSchema, webpackDevelopmentServer)
|
||||
gulp.parallel(watchSchema, watchGraphQlSchema, watchGraphQlOperations, webpackDevelopmentServer)
|
||||
)
|
||||
|
||||
module.exports = { build, watch, webpackDevServer: webpackDevelopmentServer, webpack }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user