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
extension NSMutableAttributedString { | |
func add(attribute: Attribute, range: NSRange) throws { | |
guard (range.location + range.length) <= length else { | |
throw AttributedStringError.InvalidRange(range: range) | |
} | |
addAttribute(attribute.name, value: attribute.value, range: range) | |
} | |
} |
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 webpack from 'webpack' | |
import {writeFileSync} from 'fs' | |
import {resolve} from 'path' | |
import config from 'webpack.config.js' | |
import webpackDevServer from 'webpack-dev-server' | |
config.profile = true | |
const compiler = webpack(config) |