Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
feat(templates): Warn facets usage with React Native template (#56)
Browse files Browse the repository at this point in the history
Since `attributesForFaceting` is not supported by the React Native template, warn the user about it.
  • Loading branch information
francoischalifour authored Jun 15, 2018
1 parent c15426f commit 6502feb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion templates/React InstantSearch Native/.template.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
const chalk = require('chalk');
const install = require('../../packages/tasks/node/install');
const teardown = require('../../packages/tasks/node/teardown');

module.exports = {
libraryName: 'react-instantsearch-native',
templateName: 'react-instantsearch-native',
appName: 'react-instantsearch-native-app',
keywords: ['algolia', 'instantSearch', 'react', 'react-native', 'react-instantsearch-native'],
keywords: [
'algolia',
'instantSearch',
'react',
'react-native',
'react-instantsearch-native',
],
tasks: {
setup(config) {
if (!config.silent && config.attributesForFaceting) {
console.log();
console.log(
`⚠️ The ${chalk.cyan(
'attributesForFaceting'
)} option is not supported in this template.`
);
console.log();
}

return Promise.resolve();
},
install,
teardown,
},
Expand Down

0 comments on commit 6502feb

Please sign in to comment.