You could generate an empty workspace like
$ npx create-nx-workspace expresswrkspace
and choose "empty" when being asked for a preset.
Then add node support with
const { createProjectGraphAsync } = require('@nx/devkit'); | |
const projectName = 'reactapp1'; // <<<< change this to your app name or parameterize | |
createProjectGraphAsync().then((projectGraph) => { | |
const project = projectGraph.nodes[projectName]; | |
if (!project) { | |
throw new Error(`Project '${projectName}' not found in the workspace.`); | |
} |
... | |
[alias] | |
rb = !sh -c 'node ~/bin/recbranch.js' | |
... |
/* | |
# Markdown Journal | |
- Creates a new markdown file based on the day (or opens existing file) | |
- Opens the file in the built-in editor | |
- Adds a timestamp | |
- Auto-saves as you type | |
- On first run, will prompt the user to select where to store files | |
*/ | |
// Name: Journal |
import { | |
formatFiles, | |
getProjects, | |
logger, | |
Tree, | |
updateProjectConfiguration | |
} from '@nrwl/devkit'; | |
/** | |
* Angular Material relies on the projects to have either a build target |
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest All", |
You could generate an empty workspace like
$ npx create-nx-workspace expresswrkspace
and choose "empty" when being asked for a preset.
Then add node support with
// https://twitter.com/niklas_wortmann/status/1167361268732370944 | |
const observeOnMutation = (target, config): Observable<MutationRecord[]> => { | |
return new Observable((observer) => { | |
const mutation = new MutationObserver((mutaitons, instance) => { | |
observer.next(mutations); | |
}); | |
mutation.observe(target, config); | |
const teardown = () => { |
/* | |
The MIT License (MIT) | |
Copyright (c) 2013 pwlin - [email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, |