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
'use strict' | |
module.exports = class WebpackPugManifestPlugin { | |
apply (compiler) { | |
compiler.plugin('emit', function (compilation, cb) { | |
const JSAssets = Object.keys(compilation.assets).filter(asset => /\.js$/.test(asset)) | |
JSAssets.sort((a, b) => { | |
if (/^manifest/.test(b)) return 1 | |
if (/^vendor/.test(b) && !/^manifest/.test(a)) return 1 | |
return 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
import React, {Animated, Component} from 'react-native' | |
class Player extends Component { | |
constructor () { | |
super() | |
const width = {pts: 30, ast:...} | |
this.state = { | |
pts: new Animated.Value(width.pts) | |
ast: new Animated.Value(width.ast), | |
reb: new Animated.Value(width.reb) |
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 cssStyle from './style' | |
componentWillUnmount () { | |
// delete the style when the component unmount | |
let tag = document.querySelector('style[id="react-tooltip"]') | |
document.getElementsByTagName('head')[0].removeChild(tag) | |
} | |
render() { | |
// to check if the style has been existed |
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 sass = require('node-sass') | |
var fs = require('fs') | |
var path = require('path') | |
function transferSass () { | |
sass.render({ | |
file: path.resolve(__dirname, '../src/index.scss'), //source scss file | |
outputStyle: 'compressed' | |
}, function (err, result) { | |
if (err) { |