Skip to content

Commit

Permalink
fix(vscode): Make sure that karma.conf.js is in assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku committed Jan 18, 2019
1 parent 9906790 commit daf0641
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
no_output_timeout: 20m
environment:
CYPRESS_RECORD_KEY: b8ec9ad7-505f-48bb-9990-e8d5627bac26
- run: yarn start package.ci
2 changes: 1 addition & 1 deletion apps/electron/src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-console",
"description": "Angular Console",
"version": "7.2.0",
"version": "7.2.2",
"author": {
"name": "Narwhal Technologies Inc",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion apps/vscode/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "angular-console",
"displayName": "Angular Console",
"description": "Angular Console for Visual Studio Code. The user interface app for the Angular CLI",
"version": "7.2.0",
"version": "7.2.2",
"repository": {
"type": "git",
"url": "https://github.com/nrwl/angular-console"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* This configuration normalizes the one provided by user to ensure we can track the output correctly.
*/

module.exports = function(config: any) {
module.exports = function(config) {
const originalConfigPath =
process.env.ANGULAR_CONSOLE_ORIGINAL_KARMA_CONFIG_PATH;
if (originalConfigPath) {
const original = require(originalConfigPath);

original(config);

const reporters: any[] = _getArrayValue('reporters', config);
const reporters = _getArrayValue('reporters', config);
const filteredReporters = reporters.filter(r => r !== 'dots'); // Don't allow dots report to mess up reporting.

config.set({
Expand All @@ -22,7 +22,7 @@ module.exports = function(config: any) {
}
};

function _getArrayValue(name: string, config: any) {
function _getArrayValue(name, config) {
const value = config[name];
return Array.isArray(value) ? value : (value || '').split(',');
}
File renamed without changes.
2 changes: 1 addition & 1 deletion libs/server/src/lib/utils/architect-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function normalizeCommands(cwd: string, cmds: string[]): string[] {
process.env.ANGULAR_CONSOLE_ORIGINAL_KARMA_CONFIG_PATH = karmaConfigPath;
return cmds.concat([
'--karma-config',
join(__dirname, './config/karma-angular-console.config.js')
join(__dirname, 'assets', 'karma-angular-console.config.js')
]);
}
}
Expand Down
29 changes: 16 additions & 13 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function against(affectedCommand) {
function electronBuilder(platform, dashP, extraFlags) {
return `electron-builder ${platform} -p ${dashP} ${
extraFlags ? extraFlags : ''
}`;
}`;
}

const ELECTRON_BUNDLE_PATH = join('dist', 'apps', 'electron');
Expand All @@ -39,9 +39,9 @@ const assetMappings = {
'Release'
)
},
schema: {
from: join('libs', 'server', 'src', 'schema', 'schema.graphql'),
to: join(APPLICATION_BUNDLE_PATH, 'assets', 'schema.graphql')
'server-assets': {
from: join('libs', 'server', 'src', 'assets', '*'),
to: join(APPLICATION_BUNDLE_PATH, 'assets')
},
readme: {
from: 'README.md',
Expand All @@ -56,14 +56,13 @@ module.exports = {
nps.concurrent({
'ng-cmd': `shx cp ${assetMappings['ng-cmd'].from} ${
assetMappings['ng-cmd'].to
}`,

schema: `shx cp ${assetMappings['schema'].from} ${
assetMappings['schema'].to
}`,
}`,
'server-assets': `shx cp -rf ${assetMappings['server-assets'].from} ${
assetMappings['server-assets'].to
}`,
readme: `shx cp ${assetMappings['readme'].from} ${
assetMappings['readme'].to
}`,
}`,
cli: 'node ./tools/scripts/patch-cli.js'
})
),
Expand Down Expand Up @@ -122,9 +121,13 @@ module.exports = {
`shx rm -rf ${assetMappings['node-pty-prebuilt'].to}]`,
`shx cp -rf ${assetMappings['node-pty-prebuilt'].from} ${
assetMappings['node-pty-prebuilt'].to
}`,
}`.replace(/APPLICATION/g, 'vscode'),
`node ${join('tools', 'scripts', 'vscode-vsce.js')}`
)
),
ci: nps.concurrent({
electron: electronBuilder('--mac --linux', 'never'),
vscode: 'nps package.vscode'
})
},
publish: {
// NOTE: This command should be run on a mac with Parallels installed
Expand Down Expand Up @@ -189,7 +192,7 @@ module.exports = {
: os.platform() === 'darwin'
? 'mac'
: 'linux'
} --dir -p never`
} --dir -p never`
}
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-console",
"version": "7.2.0",
"version": "7.2.2",
"private": true,
"publisher": "nrwl",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/codegen-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function generateLib(lib) {
}

module.exports = {
schema: resolve(__dirname, '../../libs/server/src/schema/schema.graphql'),
schema: resolve(__dirname, '../../libs/server/src/assets/schema.graphql'),
overwrite: true,
generates: listLibs()
.filter(lib => lib !== 'server')
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/codegen-server.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
overwrite: true
schema: ./libs/server/src/schema/schema.graphql
schema: ./libs/server/src/assets/schema.graphql
generates:
./libs/server/src/lib/generated/graphql-types.ts:
config:
Expand Down

0 comments on commit daf0641

Please sign in to comment.