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
import React from 'react'; | |
// exported to be used in .test file | |
export default className = 'someComponent'; | |
const SomeComponent = () => ( | |
<div className={className}> | |
<h1 className={`${className}__mainHeader`}>My Header</h1> | |
<p className={`${className}__randomParagraph`}> | |
Some very interesting text |
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
import { fromPromise } from 'rxjs/observable/fromPromise'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/switchMap'; | |
// IGNORE (just filters) | |
const isValidLinkedAccount = linkedAccount => { | |
const { is_linked: isLinked, link_failed: linkFailed, status, service_status: serviceStatus } = linkedAccount; | |
return isLinked && !linkFailed && status === 'active' && serviceStatus === 'active'; |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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 fs = require('fs') | |
const globSync = require('glob').sync | |
const DEFAULT_LANGUAGE = 'en' | |
const MESSAGES_PATTERN = './build/messages/**/*.json' | |
const WRITE_PATH = './src/localeData.json' | |
const TRANSLATIONS_PATTERN = './public/locales/*.json' | |
// Takes a filename: ./public/locales/it.json | |
// Returns the locale: it |