Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4fc667e
Showing
11 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.precomp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "o-table", | ||
"dependencies": { | ||
"o-colors": "^4.0.0", | ||
"o-grid": "^4.0.6", | ||
"o-icons": ">=4.0.0 <6", | ||
"o-typography": "^5.0.0", | ||
"o-brand": "^3.1.1", | ||
"o-visual-effects": "^2.0.3", | ||
"o-buttons": "^5.14.0", | ||
"dom-delegate": "ftdomdelegate#^2.2.0" | ||
}, | ||
"main": [ | ||
"main.scss", | ||
"main.js" | ||
], | ||
"ignore": [ | ||
".gitignore", | ||
"build", | ||
"test", | ||
"karma.conf.js", | ||
"package.json" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[ | ||
"fticons", | ||
"o-assets", | ||
"o-autoinit", | ||
"o-banner", | ||
"o-brand", | ||
"o-buttons", | ||
"o-colors", | ||
"o-cookie-message", | ||
"o-date", | ||
"o-dom", | ||
"o-element-visibility", | ||
"o-errors", | ||
"o-expander", | ||
"o-fetch-jsonp", | ||
"o-fonts", | ||
"o-footer", | ||
"o-footer-services", | ||
"o-forms", | ||
"o-ft-affiliate-ribbon", | ||
"o-grid", | ||
"o-header", | ||
"o-header-services", | ||
"o-hierarchical-nav", | ||
"o-hoverable", | ||
"o-icons", | ||
"o-labels", | ||
"o-layers", | ||
"o-layout", | ||
"o-link-list", | ||
"o-loading", | ||
"o-message", | ||
"o-normalise", | ||
"o-overlay", | ||
"o-quote", | ||
"o-share", | ||
"o-squishy-list", | ||
"o-subs-card", | ||
"o-syntax-highlight", | ||
"o-table", | ||
"o-tabs", | ||
"o-teaser", | ||
"o-teaser-collection", | ||
"o-techdocs", | ||
"o-toggle", | ||
"o-tooltip", | ||
"o-topper", | ||
"o-typography", | ||
"o-utils", | ||
"o-video", | ||
"o-viewport", | ||
"o-visual-effects" | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env perl6 | ||
use JSON::Pretty; | ||
my $components = from-json(slurp "components.json"); | ||
my $mappings = from-json(slurp "components.json"); | ||
|
||
sub add-npm-org (Str $name) { | ||
return qq「@financial-times/{$name}」; | ||
} | ||
|
||
sub create-npm-dependency (Str $name, Str $version) { | ||
my $is-origami-component = $components.contains($name); | ||
|
||
if ($is-origami-component) { | ||
return add-npm-org($name), $version; | ||
} | ||
|
||
my $name-is-mapped = $mappings<name>.keys.contains($name); | ||
if ($name-is-mapped) { | ||
return $mappings<name><<$name>>, $version; | ||
} | ||
|
||
my $version-is-mapped = $mappings<version>.keys.contains($version); | ||
if ($version-is-mapped) { | ||
return $name, $mappings<version><<$version>>; | ||
} | ||
|
||
my $hash-version-match = $version ~~ /'#'(\^?\d+\.\d+\.\d+)/; | ||
if ($hash-version-match.so) { | ||
return $name, @$hash-version-match[0].Str; | ||
} | ||
|
||
return $name, $version; | ||
} | ||
|
||
sub MAIN (Str $version where * ~~ /^\d+\.\d+\.\d+$/) { | ||
my $bowerManifest = from-json(lines); | ||
my $packageManifest = {}; | ||
$packageManifest<version> = $version; | ||
|
||
$packageManifest<name> = add-npm-org($bowerManifest<name>); | ||
$packageManifest<description> = $bowerManifest<description>; | ||
$packageManifest<homepage> = $bowerManifest<homepage>; | ||
$packageManifest<license> = $bowerManifest<license>; | ||
$packageManifest<dependencies> = $bowerManifest<dependencies>.map({ | ||
my ($name, $version) = create-npm-dependency(.key, .value); | ||
Pair.new: $name, $version; | ||
}).Hash; | ||
put to-json($packageManifest); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": { | ||
"ftdomdelegate": "dom-delegate", | ||
"prism": "prismjs", | ||
"hogan": "hogan.js" | ||
}, | ||
"version": { | ||
"Financial-Times/highlight.js-shim": "^8.4.0" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
grammar Semver is export { | ||
token TOP {[ | ||
<caret> | <greater-than> | <less-than> | <goe-than> | <loe-than> | <version-core> | ||
]} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
unit class Text::EasyCSV; | ||
use Text::CSV; | ||
my $csv = Text::CSV.new; | ||
|
||
sub load-csv ($path) is export { | ||
my $io = open( | ||
$path, | ||
:r, | ||
chomp => False | ||
); | ||
my @data = $csv.getline_all($io); | ||
return @data; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BEFOREHAND: close door, each window and exit; wait until time; | ||
open spell book; study; read (spell, scan, select); tell us; | ||
write it, print the hex while each watches, | ||
reverse length, write again; | ||
kill spiders, | ||
pop them, | ||
chop them, | ||
split them, | ||
kill them; | ||
unlink arms, shift, wait and listen (listening, wait); | ||
sort the flock (then, warn "the goats", kill "the sheep"); | ||
kill them, dump qualms, shift moralities, | ||
values aside, each one | ||
die sheep; die (to, reverse the => system | ||
you accept (reject, respect)); | ||
next step, | ||
kill next sacrifice, each sacrifice, | ||
wait, redo ritual until "all the spirits are pleased"; | ||
do it ("as they say"); | ||
do it($*everyone*must*participate*in*forbidden*s*e*x*); | ||
return last victim; unit package body; | ||
exit crypt (time, times and "half a time") & close it. | ||
select(quickly) and warn next victim; | ||
AFTERWARDS: tell nobody. | ||
wait, wait until time; | ||
wait until next year, next decade; | ||
sleep, sleep, die yourself, | ||
die at last |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env perl6 | ||
use JSON::Tiny; | ||
my $components = from-json(slurp "components.json"); | ||
my $mappings = from-json(slurp "components.json"); | ||
|
||
sub add-npm-org (Str $name) { | ||
return qq「@financial-times/{$name}」; | ||
} | ||
|
||
sub create-npm-dependency (Str $name, Str $version) { | ||
my $is-origami-component = $components.contains($name); | ||
|
||
my $name-is-mapped = $mappings<name>.keys.contains($name); | ||
my $version-is-mapped = $mappings<version>.keys.contains($version); | ||
|
||
if ($is-origami-component) { | ||
return $name, $version; | ||
} | ||
|
||
if ($name-is-mapped) { | ||
return $mappings<name><<$name>>, $version; | ||
} | ||
|
||
if ($version-is-mapped) { | ||
return $name, $mappings<version><<$version>>; | ||
} | ||
|
||
return $name, $version; | ||
} | ||
|
||
sub MAIN (Str $version where * ~~ /^\d+\.\d+\.\d+$/) { | ||
my $bowerManifest = from-json(lines); | ||
my $packageManifest = {}; | ||
$packageManifest<version> = $version; | ||
my ( | ||
$name, | ||
$description, | ||
$homepage, | ||
$license, | ||
$dependencies | ||
) = $bowerManifest; | ||
|
||
$packageManifest<name> = add-npm-org($name); | ||
$packageManifest<description> = $description; | ||
$packageManifest<homepage> = $homepage; | ||
$packageManifest<dependencies> = $dependencies.hyper.map(&create-npm-dependency); | ||
|
||
put to-json($packageManifest); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use Text::CSV |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sub nothing is export { | ||
say "nothing" | ||
} |