-
<MoreInfo>
spacing in unordered list followed by text...Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const util = require("util"); | |
const glob = util.promisify(require("glob")); | |
const workerFarm = require("worker-farm"); | |
const workers = workerFarm(require.resolve("./hydrate-worker")); | |
// this runs as the last step after Gatsby has built the site/ | |
module.exports.onPostBuild = async function onPostBuild({ reporter }, { ignore }) { | |
const activity = reporter.activityTimer("Prerendering Calcite Components"); | |
activity.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { read, write } = require("to-vfile"); | |
const remark = require("remark"); | |
const mdx = require("remark-mdx"); | |
const visit = require("unist-util-visit"); | |
const customPlugin = () => (tree, vfile) => { | |
vfile.data.plugin = "Set by custom plugin"; | |
visit(tree, "heading", node => { | |
if (node.depth === 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
const inPath = "./example.mdx"; | |
const outPath = "./example-out.mdx"; | |
const file = await read(inPath); | |
const processor = remark().use(mdx); | |
const tree = processor.parse(file.contents.toString()); | |
const result = processor.stringify(tree); | |
console.log("result", result); | |
await write({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { read, write } = require("to-vfile"); | |
const remark = require("remark"); | |
const mdx = require("remark-mdx"); | |
const visit = require("unist-util-visit"); | |
const parse = require("@babel/parser").parse; | |
const generate = require("@babel/generator").default; | |
const traverse = require("@babel/traverse").default; | |
const t = require("@babel/types"); | |
const { readFileSync } = require("fs"); | |
const { dirname } = require("path"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version":8, | |
"sprite":"https://cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/../sprites/sprite", | |
"glyphs":"https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf", | |
"sources":{ | |
"esri":{ | |
"type":"vector", | |
"url":"https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unified = require("unified"); | |
var remarkParse = require("remark-parse"); | |
var remarkStringify = require("remark-stringify"); | |
var { matches } = require("unist-util-select"); | |
var remove = require("unist-util-remove"); | |
var markdown = ` | |
# Test | |
# No Really |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the acetate extension | |
function gitCloneOrUpdate(config) { | |
return function(context) { | |
let cmd; | |
let repoPATH = path.join(config. config.gitCloneRootDirectory, config.gitCloneDirectory); | |
if (!fs.existsSync(repoPATH)) { | |
cmd = `git -C ${context.gitCloneRootDirectory} clone ${ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("isomorphic-fetch"); | |
require("isomorphic-form-data"); | |
const { SearchQueryBuilder, searchItems } = require("@esri/arcgis-rest-portal"); | |
const { UserSession } = require("@esri/arcgis-rest-auth"); | |
const username = "test"; | |
const password = "test" |
This is used as a custom resolver on the route you want to load the JS API modules on as per https://blog.thoughtram.io/angular/2016/10/10/resolving-route-data-in-angular-2.html.
you can then access the modules by injecting ActivatedRoute
into your component and looking at this.route.snapshot.data['esri']['Map']
.
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { EsriModuleResolveService } from "./esri-module-resolve.service";
import { MapViewComponent } from "./map-view.component";
NewerOlder