mirror of
https://github.com/remoteintech/remote-jobs
synced 2024-12-26 04:13:10 +00:00
Update npm packages (#695)
This commit is contained in:
parent
50664084b5
commit
88d2932e18
7 changed files with 773 additions and 137 deletions
25
lib/index.js
25
lib/index.js
|
@ -110,6 +110,24 @@ exports.parseFromDirectory = contentPath => {
|
|||
'utf8'
|
||||
) );
|
||||
|
||||
let inTable = false;
|
||||
readmeMarkdown.split( '\n' ).forEach( line => {
|
||||
if ( /^\s*-+\s*\|\s*-+\s*\|\s*-+\s*$/.test( line ) ) {
|
||||
inTable = true;
|
||||
} else if ( /^\s*$/.test( line ) ) {
|
||||
inTable = false;
|
||||
} else if ( inTable ) {
|
||||
const fields = line.split( '|' );
|
||||
if ( fields.length !== 3 ) {
|
||||
readmeError(
|
||||
'Expected 3 table cells but found %d: %s',
|
||||
fields.length,
|
||||
line
|
||||
);
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
const $ = cheerio.load( marked( readmeMarkdown ) );
|
||||
|
||||
function readmeError( msg, ...params ) {
|
||||
|
@ -126,13 +144,6 @@ exports.parseFromDirectory = contentPath => {
|
|||
return;
|
||||
}
|
||||
const $td = $( tr ).children( 'td' );
|
||||
if ( $td.length !== 3 ) {
|
||||
readmeError(
|
||||
'Expected 3 table cells but found %d: %s',
|
||||
$td.length,
|
||||
$( tr ).html().replace( /\n/g, '' )
|
||||
);
|
||||
}
|
||||
|
||||
const websiteUrl = $td.eq( 1 ).text();
|
||||
const websiteText = websiteUrl
|
||||
|
|
855
package-lock.json
generated
855
package-lock.json
generated
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -13,15 +13,15 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"cheerio": "^1.0.0-rc.2",
|
||||
"marked": "^0.3.12",
|
||||
"phin": "^2.9.1",
|
||||
"rimraf": "^2.6.2",
|
||||
"swig-templates": "^2.0.2"
|
||||
"cheerio": "^1.0.0-rc.3",
|
||||
"marked": "^0.7.0",
|
||||
"phin": "^3.4.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"swig-templates": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2",
|
||||
"chai": "^4.2.0",
|
||||
"http-server": "^0.11.1",
|
||||
"mocha": "^5.2.0"
|
||||
"mocha": "^6.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
<p>Check out our <a href="https://10up.com/careers/">careers page</a> and send an email to jobs@10up.com. Our amazing Recruitment Manager Christine Garrison will be on the other end.</p>
|
||||
<p>Check out our <a href="https://10up.com/careers/">careers page</a> and send an email to <a href="mailto:jobs@10up.com">jobs@10up.com</a>. Our amazing Recruitment Manager Christine Garrison will be on the other end.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<p><a href="https://pages.18f.gov/joining-18f/open-positions/">Open positions</a></p>
|
||||
|
||||
<p>If you want to apply directly to 18F please email join18f@gsa.gov. We don’t require a formal cover letter, but let us know more about you:</p>
|
||||
<p>If you want to apply directly to 18F please email <a href="mailto:join18f@gsa.gov">join18f@gsa.gov</a>. We don’t require a formal cover letter, but let us know more about you:</p>
|
||||
|
||||
<p>Send your current resume, preferably as a PDF.
|
||||
Link to your GitHub profile, design portfolio, or attach a writing sample.
|
||||
|
|
|
@ -12,8 +12,7 @@ website links.</p>
|
|||
<th>Region</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<tbody><tr>
|
||||
<td class="company-name"><a href="/and-yet/">&yet</a></td>
|
||||
<td class="company-website"><a href="https://andyet.com" target="_blank" rel="noopener noreferrer">andyet.com</a></td>
|
||||
<td class="company-region">Worldwide</td>
|
||||
|
@ -48,5 +47,4 @@ website links.</p>
|
|||
<td class="company-website"><a href="http://www.wikihow.com/wikiHow:About-wikiHow" target="_blank" rel="noopener noreferrer">wikihow.com/wikiHow:About-wikiHow</a></td>
|
||||
<td class="company-region">PST Timezone</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody></table>
|
||||
|
|
|
@ -14,8 +14,8 @@ describe( 'validation errors', () => {
|
|||
expectValidateFixturesResult( 'bad-table-rows', {
|
||||
errorCount: 2,
|
||||
output: [
|
||||
'README.md: Expected 3 table cells but found 2: <td><a href="/company-profiles/10up.md">10up</a></td><td><a href="https://10up.com/">https://10up.com/</a></td>',
|
||||
'README.md: Expected 3 table cells but found 4: <td><a href="/company-profiles/18f.md">18F</a></td><td><a href="https://18f.gsa.gov/">https://18f.gsa.gov/</a></td><td>USA</td><td>something else</td>',
|
||||
'README.md: Expected 3 table cells but found 2: [10up](/company-profiles/10up.md) | https://10up.com/',
|
||||
'README.md: Expected 3 table cells but found 4: [18F](/company-profiles/18f.md) | https://18f.gsa.gov/ | USA | something else',
|
||||
],
|
||||
} );
|
||||
} );
|
||||
|
@ -69,7 +69,7 @@ describe( 'validation errors', () => {
|
|||
'10up.md: The main title is wrapped inside of another element.',
|
||||
'10up.md: Company name looks wrong: ""',
|
||||
'17hats.md: Company title "A company called 17hats" doesn\'t match filename (expected ~ "a-company-called-17hats.md")',
|
||||
'18f.md: Company name looks wrong: "$%$#%$"',
|
||||
'18f.md: Company name looks wrong: "$%$#%$#"',
|
||||
'and-yet.md: Expected 1 first-level heading but found 2',
|
||||
'let-s-encrypt.md: Company title "Let\'s Encrypt" doesn\'t match filename (expected ~ "lets-encrypt.md")',
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue